8277159: Fix java/nio/file/FileStore/Basic.java test by ignoring /run/user/* mount points
Reviewed-by: bpb, shade
This commit is contained in:
parent
8f5a8f740b
commit
b6876649a8
@ -145,6 +145,16 @@ public class Basic {
|
||||
// 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user