-
Bug
-
Resolution: Fixed
-
P4
-
16, 17, 18
-
b21
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8347880 | 17.0.15 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
Executing the gtest launcher from a read-only directory makes it assert:
```
[ RUN ] LogFileOutput.invalid_file_vm
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/logTestUtils.inline.hpp:67
assert failed: assert(!failed) failed: failed to create directory tmplogdir#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/logging/logTestUtils.inline.hpp:67), pid=19908, tid=19908
# assert(!failed) failed: failed to create directory tmplogdir
#
```
At the very least, this should not be an assert but a gtest error (ASSERT or EXPECT). VM asserts at this point are just rude :)
Better would be to make gtests use the OS temp dir for these kind of tests.
Arguably the best option would be not to write to the file system at all. Tests needing temp files and modifying the file system are better suited for the jtreg suite, which deals also with temp files (cleanup etc) and where tests like these typically live.
```
[ RUN ] LogFileOutput.invalid_file_vm
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/logTestUtils.inline.hpp:67
assert failed: assert(!failed) failed: failed to create directory tmplogdir#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/logging/logTestUtils.inline.hpp:67), pid=19908, tid=19908
# assert(!failed) failed: failed to create directory tmplogdir
#
```
At the very least, this should not be an assert but a gtest error (ASSERT or EXPECT). VM asserts at this point are just rude :)
Better would be to make gtests use the OS temp dir for these kind of tests.
Arguably the best option would be not to write to the file system at all. Tests needing temp files and modifying the file system are better suited for the jtreg suite, which deals also with temp files (cleanup etc) and where tests like these typically live.
- backported by
-
JDK-8347880 LogFileOutput.invalid_file_vm asserts when being executed from a read only working directory
-
- Resolved
-
- relates to
-
JDK-8165702 Convert LogFileOutput internal tests to GTest
-
- Resolved
-
- links to
-
Commit openjdk/jdk/d9541c5e
-
Commit(master) openjdk/jdk17u-dev/dffe2dcb
-
Review openjdk/jdk/8238
-
Review(master) openjdk/jdk17u-dev/3211
(1 links to)