Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8277159

Fix java/nio/file/FileStore/Basic.java test by ignoring /run/user/* mount points

    XMLWordPrintable

Details

    • b24
    • generic
    • linux

    Backports

      Description

        java/nio/file/FileStore/Basic.java test is failing on Linux with the following stacktrace:

        /run/user/1000/doc (portal) (name=portal type=fuse.portal)
        ----------System.err:(16/985)----------
        java.nio.file.FileSystemException: /run/user/1000/doc: Operation not permitted
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixFileStore.readAttributes(UnixFileStore.java:115)
        at java.base/sun.nio.fs.UnixFileStore.getTotalSpace(UnixFileStore.java:122)
        at Basic.doTests(Basic.java:135)
        at Basic.main(Basic.java:49)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:577)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
        at java.base/java.lang.Thread.run(Thread.java:833)

        The problem is the same as in JDK-8272369 and caused by the mount points of fuse.portal type that return EPERM: Operation not permitted on access.

        To reproduce the problem with /run/user/1000/doc mount on Fedora 34 one can run:

        $ /usr/libexec/xdg-document-portal

        This behaviour is also known to cause problems to various Linux utilities, references:

        https://lists.debian.org/debian-user/2021/06/msg00022.html
        https://bugzilla.redhat.com/show_bug.cgi?id=1952714
        https://bugzilla.redhat.com/show_bug.cgi?id=1913358
        https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=9a38d499ca16f2f4304992eb1ab0894cd0b478e1
        https://github.com/flatpak/xdg-desktop-portal/issues/512


        Attachments

          Issue Links

            Activity

              People

                akasko Alex Kasko
                akasko Alex Kasko
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: