Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion jdk/test/java/nio/file/FileStore/Basic.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @bug 4313887 6873621 6979526 7006126 7020517
* @summary Unit test for java.nio.file.FileStore
* @key intermittent
* @library .. /lib/testlibrary
* @library .. /lib/testlibrary /test/lib
* @build jdk.testlibrary.FileUtils
* @run main Basic
*/
Expand All @@ -36,6 +36,7 @@
import java.io.IOException;
import java.util.*;
import jdk.testlibrary.FileUtils;
import jdk.test.lib.Platform;

public class Basic {

Expand Down Expand Up @@ -134,6 +135,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