-
Bug
-
Resolution: Unresolved
-
P4
-
25
-
Fix Understood
A number of our older tests were written to only run the test code on particular platforms, and immediately exit on other platforms. A couple examples of how this is done:
if (File.separatorChar != '\\') {
/* This test is only valid on win32 systems */
return;
}
or
if (!System.getProperty("os.name").contains("OS X")) {
System.out.println("Test only run on MAC. Exiting.");
return;
}
But now that we have jtreg's @requires tag, these tests can be tagged to only run on the relevant platforms. This should prevent these tests from being run, and superficial results being generated, on unnecessary platforms.
if (File.separatorChar != '\\') {
/* This test is only valid on win32 systems */
return;
}
or
if (!System.getProperty("os.name").contains("OS X")) {
System.out.println("Test only run on MAC. Exiting.");
return;
}
But now that we have jtreg's @requires tag, these tests can be tagged to only run on the relevant platforms. This should prevent these tests from being run, and superficial results being generated, on unnecessary platforms.
- relates to
-
JDK-8359221 Amend java/io/FilePermission/Correctness.java to @requires for OS platform selection
-
- Closed
-
There are no Sub-Tasks for this issue.