Skip to content

Commit

Permalink
8325201: (zipfs) Disable TestPosix.setPermissionsShouldConvertToUnix …
Browse files Browse the repository at this point in the history
…which fails on Windows

Reviewed-by: lancea
  • Loading branch information
Eirik Bjørsnøs committed Feb 4, 2024
1 parent ed06846 commit 692c9f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/jdk/jdk/nio/zipfs/TestPosix.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public class TestPosix {
// misc
private static final CopyOption[] COPY_ATTRIBUTES = {StandardCopyOption.COPY_ATTRIBUTES};
private static final Map<String, ZipFileEntryInfo> ENTRIES = new HashMap<>();
private static final boolean isWindows = System.getProperty("os.name") .startsWith("Windows");

private int entriesCreated;

Expand Down Expand Up @@ -741,6 +742,10 @@ public void setPermissionsShouldPreserveRemainingBits() throws IOException {
*/
@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)) {
Expand Down
1 change: 1 addition & 0 deletions test/jdk/jdk/nio/zipfs/test.policy.posix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};

1 comment on commit 692c9f8

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.