Skip to content


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

Reviewed-by: bpb, shade
  • Loading branch information
akashche authored and zhengyu123 committed Nov 17, 2021
1 parent 8f5a8f7 commit b687664
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/jdk/java/nio/file/FileStore/
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 b687664

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.