From eb26865c36f1961ee802c8db812c786d4bdd4944 Mon Sep 17 00:00:00 2001 From: Francesco Andreuzzi Date: Tue, 16 Sep 2025 08:00:32 +0000 Subject: [PATCH] 8367552: JCmdTestFileSafety.java fails when run by root user Reviewed-by: dcubed, ayang, phubner --- .../jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java b/test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java index 68d77c5455c..74f98d5b777 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java @@ -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); } }