Skip to content

Commit

Permalink
8277159: Fix java/nio/file/FileStore/Basic.java test by ignoring /run…
Browse files Browse the repository at this point in the history
…/user/* mount points

Backport-of: b6876649a82bed508d817ccbde1600d00937e4b2
  • Loading branch information
GoeLin committed Oct 10, 2022
1 parent 57c1b21 commit 094ca71
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/jdk/java/nio/file/FileStore/Basic.java
Expand Up @@ -145,6 +145,16 @@ static void doTests(Path dir) throws IOException {
// reflect whether the space attributes would be accessible
// were access to be permitted
System.err.format("%s is inaccessible\n", store);
} catch (FileSystemException fse) {
// On Linux, ignore the FSE if the path is one of the
// /run/user/$UID mounts created by pam_systemd(8) as it
// might be mounted as a fuse.portal filesystem and
// its access attempt might fail with EPERM
if (!Platform.isLinux() || store.toString().indexOf("/run/user") == -1) {
throw new RuntimeException(fse);
} else {
System.err.format("%s error: %s\n", store, fse);
}
}

// two distinct FileStores should not be equal
Expand Down

1 comment on commit 094ca71

@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.