From 692c9f8821e220560927dd6bbedfea9ddfe312f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eirik=20Bj=C3=B8rsn=C3=B8s?= Date: Sun, 4 Feb 2024 21:01:37 +0000 Subject: [PATCH] 8325201: (zipfs) Disable TestPosix.setPermissionsShouldConvertToUnix which fails on Windows Reviewed-by: lancea --- test/jdk/jdk/nio/zipfs/TestPosix.java | 5 +++++ test/jdk/jdk/nio/zipfs/test.policy.posix | 1 + 2 files changed, 6 insertions(+) diff --git a/test/jdk/jdk/nio/zipfs/TestPosix.java b/test/jdk/jdk/nio/zipfs/TestPosix.java index 179c6a55cfb..079d3378748 100644 --- a/test/jdk/jdk/nio/zipfs/TestPosix.java +++ b/test/jdk/jdk/nio/zipfs/TestPosix.java @@ -104,6 +104,7 @@ public class TestPosix { // misc private static final CopyOption[] COPY_ATTRIBUTES = {StandardCopyOption.COPY_ATTRIBUTES}; private static final Map ENTRIES = new HashMap<>(); + private static final boolean isWindows = System.getProperty("os.name") .startsWith("Windows"); private int entriesCreated; @@ -741,6 +742,10 @@ public class TestPosix { */ @Test public void setPermissionsShouldConvertToUnix() throws IOException { + // Temporarily skip test on Windows until intermittent failures are investigated + if(isWindows) { + return; + } // The default environment creates MS-DOS entries, with zero 'external file attributes' createEmptyZipFile(ZIP_FILE, ENV_DEFAULT); try (FileSystem fs = FileSystems.newFileSystem(ZIP_FILE, ENV_DEFAULT)) { diff --git a/test/jdk/jdk/nio/zipfs/test.policy.posix b/test/jdk/jdk/nio/zipfs/test.policy.posix index 77415b0f4ba..ba3ecde3f39 100644 --- a/test/jdk/jdk/nio/zipfs/test.policy.posix +++ b/test/jdk/jdk/nio/zipfs/test.policy.posix @@ -4,6 +4,7 @@ grant { permission java.util.PropertyPermission "test.jdk","read"; permission java.util.PropertyPermission "test.src","read"; permission java.util.PropertyPermission "user.dir","read"; + permission java.util.PropertyPermission "os.name","read"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.module"; permission java.lang.RuntimePermission "accessUserInformation"; };