@@ -45,7 +45,7 @@ public static void main(String[] args) {
45
45
}
46
46
47
47
// At least one argument should be specified
48
- if ( (args == null ) || (args .length < 1 ) ) {
48
+ if ((args == null ) || (args .length < 1 )) {
49
49
throw new IllegalArgumentException ("At lease one argument should be specified, the signal name" );
50
50
}
51
51
@@ -65,7 +65,7 @@ public static void main(String[] args) {
65
65
}
66
66
}
67
67
68
- Path test = Paths .get (System . getProperty ( "test.nativepath" ) )
68
+ Path test = Paths .get (Utils . TEST_NATIVE_PATH )
69
69
.resolve ("sigtest" )
70
70
.toAbsolutePath ();
71
71
String envVar = Platform .sharedLibraryPathVariableName ();
@@ -87,16 +87,17 @@ public static void main(String[] args) {
87
87
cmd .addAll (vmargs ());
88
88
89
89
// add test specific arguments w/o signame
90
- cmd .addAll (Arrays .asList (args )
91
- .subList (1 , args .length ));
90
+ var argList = Arrays .asList (args )
91
+ .subList (1 , args .length );
92
+ cmd .addAll (argList );
92
93
93
94
boolean passed = true ;
94
95
95
- for (String mode : new String []{"sigset" , "sigaction" }) {
96
+ for (String mode : new String [] {"sigset" , "sigaction" }) {
96
97
for (String scenario : new String [] {"nojvm" , "prepre" , "prepost" , "postpre" , "postpost" }) {
97
98
cmd .set (modeIdx , mode );
98
99
cmd .set (scenarioIdx , scenario );
99
- System .out .printf ("START TESTING: SIGNAL = %s, MODE = %s, SCENARIO=%s%n" ,signame , mode , scenario );
100
+ System .out .printf ("START TESTING: SIGNAL = %s, MODE = %s, SCENARIO=%s%n" , signame , mode , scenario );
100
101
System .out .printf ("Do execute: %s%n" , cmd .toString ());
101
102
102
103
ProcessBuilder pb = new ProcessBuilder (cmd );
@@ -117,7 +118,7 @@ public static void main(String[] args) {
117
118
oa .reportDiagnosticSummary ();
118
119
int exitCode = oa .getExitValue ();
119
120
if (exitCode == 0 ) {
120
- System .out .println ("PASSED with exit code 0" );
121
+ System .out .println ("PASSED with exit code 0" );
121
122
} else {
122
123
System .out .println ("FAILED with exit code " + exitCode );
123
124
passed = false ;
0 commit comments