8321938: java/foreign/critical/TestCriticalUpcall.java does not need a core file

Reviewed-by: dholmes
This commit is contained in:
Daniel D. Daugherty 2024-01-18 13:15:55 +00:00
parent 806ffb1085
commit a22ae909bc

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.Linker;
import java.lang.foreign.MemorySegment;
import java.lang.invoke.MethodHandle;
import java.util.List;
import static org.testng.Assert.fail;
@ -43,7 +44,7 @@ public class TestCriticalUpcall extends UpcallTestHelper {
@Test
public void testUpcallFailure() throws IOException, InterruptedException {
// test to see if we catch a trivial downcall doing an upcall
runInNewProcess(Runner.class, true)
runInNewProcess(Runner.class, true, List.of("-XX:-CreateCoredumpOnCrash"), List.of())
.shouldNotHaveExitValue(0)
.stdoutShouldContain("wrong thread state for upcall");
}