RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
Jaikiran Pai
jpai at openjdk.org
Fri Jul 26 04:39:33 UTC 2024
On Thu, 25 Jul 2024 09:50:10 GMT, SendaoYan <syan at openjdk.org> wrote:
>> Hi all,
>> Test `test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java` fails on rpm build mock environment. The `df -h` command return fail `df: cannot read table of mounted file systems: No such file or directory` on the rpm build mock environment also. I think it's a environmental issue, and the environmental issue should not cause the test fails, it should skip the test.
>>
>> The rpmbuild mock enviroment is like a sandbox, which created by `chroot` shell command, in the rpmbuild mock enviroment, `df -h` report `cannot read table of mounted file systems`, and java Files.getFileStore also throw `IOException`. We want to build and test the jdk in this `sandbox`, and the default jtreg work directory is `JTWork` in current directory, so this testcase will report fails.
>>
>> Only change the testcase, the change has been verified locally, no risk.
>
> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>
> 1. Just catch the IOException here when getting the FileStore and skip the test instead of checking for specific exception messages. 2. Throw a org.testng.SkipException instead print and return
> Additional, the org.testng.SkipException seems do not work normally in [jtreg](https://bugs.openjdk.org/browse/CODETOOLS-7903708) for now.
We have had several enhancement reports (in jtreg) for better reporting skipped tests. Some relate to what the make scripts in the JDK report and some from jtreg reports themselves. I'll have to go back and check if the one you note about is something that we are already aware about. For now though, your change to use `SkippedException` looks correct to me.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2251959084
More information about the core-libs-dev
mailing list