Skip to content

Commit 8f7589f

Browse files
Sonia Zaldana CallesGoeLin
authored andcommitted
8211045: [Testbug] Fix for 8144279 didn't define a test case!
Add missing file from original commit Backport-of: bc6fb26
1 parent 2bbab16 commit 8f7589f

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
24+
/*
25+
* @test Testjsig.java
26+
* @bug 8017498
27+
* @bug 8020791
28+
* @bug 8021296
29+
* @bug 8022301
30+
* @bug 8025519
31+
* @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
32+
* @requires (os.family == "linux")
33+
* @library /test/lib
34+
* @compile TestJNI.java
35+
* @run driver Testjsig
36+
*/
37+
38+
import jdk.test.lib.process.ProcessTools;
39+
import jdk.test.lib.process.OutputAnalyzer;
40+
41+
public class Testjsig {
42+
43+
public static void main(String[] args) throws Throwable {
44+
45+
// Get the JDK, library and class path properties
46+
String libpath = System.getProperty("java.library.path");
47+
48+
// Create a new java process for the TestJNI Java/JNI test
49+
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
50+
"-Djava.library.path=" + libpath + ":.",
51+
"TestJNI",
52+
"100");
53+
54+
// Start the process and check the output
55+
OutputAnalyzer output = new OutputAnalyzer(pb.start());
56+
output.shouldContain("old handler");
57+
}
58+
}

0 commit comments

Comments
 (0)