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

java/security/Policy/Root/Root.java fails when home directory is read-only

    XMLWordPrintable

Details

    Backports

      Description

        The following test fails in the JDK21 CI:

        java/security/Policy/Root/Root.java

        Heres a snippet from the log file:

        #section:testng
        ----------messages:(6/219)----------
        command: testng Root
        reason: User specified action: run testng/othervm Root
        started: Wed Jan 11 19:56:10 GMT 2023
        Mode: othervm [/othervm specified]
        finished: Wed Jan 11 19:56:10 GMT 2023
        elapsed time (seconds): 0.887
        ----------configuration:(0/0)----------
        ----------System.out:(80/5227)----------
        config Root.setup(): failure
        java.nio.file.AccessDeniedException: /opt/mach5/.java.policy
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
        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.UnixFileSystem.copyFile(UnixFileSystem.java:668)
        at java.base/sun.nio.fs.BsdFileSystem.copyFile(BsdFileSystem.java:154)
        at java.base/sun.nio.fs.UnixFileSystem.copy(UnixFileSystem.java:1060)
        at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:300)
        at java.base/java.nio.file.Files.copy(Files.java:1303)
        at Root.setup(Root.java:53)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61)
        at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366)
        at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320)
        at org.testng.TestRunner.invokeTestConfigurations(TestRunner.java:617)
        at org.testng.TestRunner.beforeRun(TestRunner.java:607)
        at org.testng.TestRunner.run(TestRunner.java:578)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:93)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:53)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
        at java.base/java.lang.Thread.run(Thread.java:1623)
        test Root.test(): skip
        java.nio.file.AccessDeniedException: /opt/mach5/.java.policy
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
        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.UnixFileSystem.copyFile(UnixFileSystem.java:668)
        at java.base/sun.nio.fs.BsdFileSystem.copyFile(BsdFileSystem.java:154)
        at java.base/sun.nio.fs.UnixFileSystem.copy(UnixFileSystem.java:1060)
        at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:300)
        at java.base/java.nio.file.Files.copy(Files.java:1303)
        at Root.setup(Root.java:53)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61)
        at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366)
        at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320)
        at org.testng.TestRunner.invokeTestConfigurations(TestRunner.java:617)
        at org.testng.TestRunner.beforeRun(TestRunner.java:607)
        at org.testng.TestRunner.run(TestRunner.java:578)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:93)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:53)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
        at java.base/java.lang.Thread.run(Thread.java:1623)
        config Root.cleanUp(): skip

        ===============================================
        java/security/Policy/Root/Root.java
        Total tests run: 1, Passes: 0, Failures: 0, Skips: 1
        Configuration Failures: 1, Skips: 1
        ===============================================

        ----------System.err:(12/672)----------
        java.lang.Exception: failures: 1
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:95)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:53)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
        at java.base/java.lang.Thread.run(Thread.java:1623)

        JavaTest Message: Test threw exception: java.lang.Exception: failures: 1
        JavaTest Message: shutting down test

        STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1
        ----------rerun:(35/7521)*----------

        Attachments

          Issue Links

            Activity

              People

                bhuang Bill Huang
                dcubed Daniel Daugherty
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: