8367552: JCmdTestFileSafety.java fails when run by root user

Reviewed-by: dcubed, ayang, phubner
This commit is contained in:
Francesco Andreuzzi 2025-09-16 08:00:32 +00:00 committed by Albert Mingkun Yang
parent 3ba2e748d6
commit eb26865c36

View File

@ -141,6 +141,9 @@ public class JCmdTestFileSafety extends JCmdTestDumpBase {
// to create archive successfully which is not expected.
throw new jtreg.SkippedException("Test skipped on Windows");
}
if (Platform.isRoot()) {
throw new jtreg.SkippedException("Test skipped when executed by root user.");
}
runTest(JCmdTestFileSafety::test);
}
}