Skip to content

Commit 692c9f8

Browse files
author
Eirik Bjørsnøs
committedFeb 4, 2024
8325201: (zipfs) Disable TestPosix.setPermissionsShouldConvertToUnix which fails on Windows
Reviewed-by: lancea
1 parent ed06846 commit 692c9f8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎test/jdk/jdk/nio/zipfs/TestPosix.java

+5
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public class TestPosix {
104104
// misc
105105
private static final CopyOption[] COPY_ATTRIBUTES = {StandardCopyOption.COPY_ATTRIBUTES};
106106
private static final Map<String, ZipFileEntryInfo> ENTRIES = new HashMap<>();
107+
private static final boolean isWindows = System.getProperty("os.name") .startsWith("Windows");
107108

108109
private int entriesCreated;
109110

@@ -741,6 +742,10 @@ public void setPermissionsShouldPreserveRemainingBits() throws IOException {
741742
*/
742743
@Test
743744
public void setPermissionsShouldConvertToUnix() throws IOException {
745+
// Temporarily skip test on Windows until intermittent failures are investigated
746+
if(isWindows) {
747+
return;
748+
}
744749
// The default environment creates MS-DOS entries, with zero 'external file attributes'
745750
createEmptyZipFile(ZIP_FILE, ENV_DEFAULT);
746751
try (FileSystem fs = FileSystems.newFileSystem(ZIP_FILE, ENV_DEFAULT)) {

‎test/jdk/jdk/nio/zipfs/test.policy.posix

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ grant {
44
permission java.util.PropertyPermission "test.jdk","read";
55
permission java.util.PropertyPermission "test.src","read";
66
permission java.util.PropertyPermission "user.dir","read";
7+
permission java.util.PropertyPermission "os.name","read";
78
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.module";
89
permission java.lang.RuntimePermission "accessUserInformation";
910
};

0 commit comments

Comments
 (0)
Please sign in to comment.