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