-
Bug
-
Resolution: Fixed
-
P4
-
17, 21
-
b22
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8308852 | 17.0.8 | Arno Zeller | P4 | Resolved | Fixed | b04 |
When running the hotspot jtreg test serviceability/sa/ClhsdbDumpclass.java on a macOS that allows for passwordless sudo, the test will leave a file in the scratch directories that is owned by root and cannot be deleted by normal users.
On macOS the test start the class dump with sudo if possible. The dumped class file is owned by root and will be dumped to $JTwork/scratch/jdk/test/lib/apps/LingeredApp.class
The test will write a warning in the jtr file:
...
#section:script_messages
----------messages:(11/980)----------
JDK under test: xxx
openjdk version "21-internal" 2023-05-02
....
Library /test/lib; kind: packages
source directory: xxx/sources/test/lib
class directory: xxx/JTwork/classes/test/lib
Can't delete xxx/JTwork/scratch/jdk/test/lib/apps/LingeredApp.class
Can't clean xxx/JTwork/scratch
WARNING: failed to clean up files after test
WARNING: closing agent(s)
....
I suggest to skip the test in case that sudo rights are available. That was already done for a similar test inJDK-8290687.
On macOS the test start the class dump with sudo if possible. The dumped class file is owned by root and will be dumped to $JTwork/scratch/jdk/test/lib/apps/LingeredApp.class
The test will write a warning in the jtr file:
...
#section:script_messages
----------messages:(11/980)----------
JDK under test: xxx
openjdk version "21-internal" 2023-05-02
....
Library /test/lib; kind: packages
source directory: xxx/sources/test/lib
class directory: xxx/JTwork/classes/test/lib
Can't delete xxx/JTwork/scratch/jdk/test/lib/apps/LingeredApp.class
Can't clean xxx/JTwork/scratch
WARNING: failed to clean up files after test
WARNING: closing agent(s)
....
I suggest to skip the test in case that sudo rights are available. That was already done for a similar test in
- backported by
-
JDK-8308852 serviceability/sa/ClhsdbDumpclass.java could leave files owned by root on macOS
- Resolved
- relates to
-
JDK-8290687 serviceability/sa/TestClassDump.java could leave files owned by root on macOS
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/50aabaa9
-
Commit openjdk/jdk/5c7ede94
-
Review openjdk/jdk17u-dev/1387
-
Review openjdk/jdk/13791
(1 links to)