Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v4]
On Fri, 26 Jul 2024 06:29:18 GMT, Jaikiran Pai wrote: > The latest change looks OK to me. Please wait for Alan to decide if this is > OK to integrate. Okey, thanks. - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2252123786
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v4]
On Fri, 26 Jul 2024 06:29:05 GMT, SendaoYan 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: > > add the exception's toString() into SkipException The latest change looks OK to me. Please wait for Alan to decide if this is OK to integrate. - Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19905#pullrequestreview-2201036393
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Fri, 26 Jul 2024 04:30:16 GMT, Jaikiran Pai wrote: >> 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 > > test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java line 217: > >> 215: } catch (IOException e) { >> 216: e.printStackTrace(); >> 217: throw new SkipException("WARNING: IOException occur. >> Skipping testDumpDirNotWritable test."); > > Nit: "occurred" instead "occur". Additionally, I would suggest even the > exception's toString() in that message just to provide additional context at > the location wherever this will get reported outside of a .jtr (if at all). > So something like: > > throw new SkipException("WARNING: IOException occurred: " + e + ", Skipping > testDumpDirNotWritable test."); Thanks for your advice and review again. - PR Review Comment: https://git.openjdk.org/jdk/pull/19905#discussion_r1692570083
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v4]
> 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: add the exception's toString() into SkipException - Changes: - all: https://git.openjdk.org/jdk/pull/19905/files - new: https://git.openjdk.org/jdk/pull/19905/files/9c7946f8..b3af3f87 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk=19905=03 - incr: https://webrevs.openjdk.org/?repo=jdk=19905=02-03 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19905.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19905/head:pull/19905 PR: https://git.openjdk.org/jdk/pull/19905
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 09:50:10 GMT, SendaoYan 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
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 09:50:10 GMT, SendaoYan 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 test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java line 217: > 215: } catch (IOException e) { > 216: e.printStackTrace(); > 217: throw new SkipException("WARNING: IOException occur. > Skipping testDumpDirNotWritable test."); Nit: "occurred" instead "occur". Additionally, I would suggest even the exception's toString() in that message just to provide additional context at the location wherever this will get reported outside of a .jtr (if at all). So something like: throw new SkipException("WARNING: IOException occurred: " + e + ", Skipping testDumpDirNotWritable test."); - PR Review Comment: https://git.openjdk.org/jdk/pull/19905#discussion_r1692498834
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 13:23:37 GMT, Alan Bateman wrote: > Is this because you only run tier1 or do you mean this is the only test that > fails? We only run tier1 on rpmbuild mock enviroment. - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2250369276
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 12:54:16 GMT, SendaoYan wrote: > > Okay, but doesn't mean that lots of other tests will fail too, esp. tests > > in jdk_nio test group. > > Currently we observer only this test fails of tier1. Is this because you only run tier1 or do you mean this is the only test that fails? - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2250315338
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 12:48:20 GMT, Alan Bateman wrote: > Okay, but doesn't mean that lots of other tests will fail too, esp. tests in > jdk_nio test group. Currently we observer only this test fails of tier1. - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2250252865
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 12:39:35 GMT, SendaoYan wrote: > 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. Okay, but doesn't mean that lots of other tests will fail too, esp. tests in jdk_nio test group. - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2250241338
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 09:50:10 GMT, SendaoYan 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 GHA report a failure: linux x86 `compiler/interpreter/Test6833129.java` fails `SIGSEGV in oopDesc::size_given_klass`, this issue has been recorded by [JDK-8334760](https://bugs.openjdk.org/browse/JDK-8334760), it's unrelated to this PR. - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2250234321
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 10:23:29 GMT, Alan Bateman wrote: > Would it possible to provide a summary on how Mock works and how we end up > with the current directory in a location that doesn't have a mount point? 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. ![image](https://github.com/user-attachments/assets/693928c6-9080-4cfe-b90b-cc0d3133478a) - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2250225244
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
On Thu, 25 Jul 2024 09:50:10 GMT, SendaoYan 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. >> >> 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 Would it possible to provide a summary on how Mock works and how we end up with the current directory in a location that doesn't have a mount point? - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2249991703
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v2]
On Thu, 25 Jul 2024 04:53:33 GMT, Jaikiran Pai wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add a word throw > > test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java line 216: > >> 214: } catch (IOException e) { >> 215: if (e.getMessage().contains("Mount point not found")) { >> 216: // We would like to skip the test with a cause with > > Hello @sendaoYan, it feels very specific and odd to be checking only for this > exception message. This test method's goal appears to be to create a > read-only directory into which it wants to write out the proxy classes and > verify that it won't be able to do that. For that it first verifies that the > underlying `FileStore` supports posix file attributes. If it's not able to > ascertain that the underlying `FileStore` has posix support, then it skips > the test. > > So I think we should just catch the `IOException` here when getting the > FileStore and skip the test instead of checking for specific exception > messages. While we are at it, we should throw a `org.testng.SkipException` > (this is a testng test) from this method wherever we are currently skipping > the test execution by writing out a System.out warning message and returning. Thanks for your advice, the checking for specific exception messages has been replaced to just catch the IOException when getting the FileStore, and all the `System.out warning message and returning` has been replaced to `org.testng.SkipException`. Additional, the `org.testng.SkipException` seems do not work normally in [jtreg](https://bugs.openjdk.org/browse/CODETOOLS-7903708) for now. - PR Review Comment: https://git.openjdk.org/jdk/pull/19905#discussion_r1691168794
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v3]
> 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. > > 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 - Changes: - all: https://git.openjdk.org/jdk/pull/19905/files - new: https://git.openjdk.org/jdk/pull/19905/files/8931debe..9c7946f8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk=19905=02 - incr: https://webrevs.openjdk.org/?repo=jdk=19905=01-02 Stats: 17 lines in 1 file changed: 1 ins; 11 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/19905.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19905/head:pull/19905 PR: https://git.openjdk.org/jdk/pull/19905
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v2]
On Wed, 26 Jun 2024 15:40:36 GMT, SendaoYan 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. >> >> 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: > > add a word throw test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java line 216: > 214: } catch (IOException e) { > 215: if (e.getMessage().contains("Mount point not found")) { > 216: // We would like to skip the test with a cause with Hello @sendaoYan, it feels very specific and odd to be checking only for this exception message. This test method's goal appears to be to create a read-only directory into which it wants to write out the proxy classes and verify that it won't be able to do that. For that it first verifies that the underlying `FileStore` supports posix file attributes. If it's not able to ascertain that the underlying `FileStore` has posix support, then it skips the test. So I think we should just catch the `IOException` here when getting the FileStore and skip the test instead of checking for specific exception messages. While we are at it, we should throw a `org.testng.SkipException` (this is a testng test) from this method wherever we are currently skipping the test execution by writing out a System.out warning message and returning. - PR Review Comment: https://git.openjdk.org/jdk/pull/19905#discussion_r1690807453
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v2]
On Wed, 26 Jun 2024 15:40:36 GMT, SendaoYan 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. >> >> 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: > > add a word throw Hi, is there anyone take look this PR. - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2249202447
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment [v2]
> 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. > > 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: add a word throw - Changes: - all: https://git.openjdk.org/jdk/pull/19905/files - new: https://git.openjdk.org/jdk/pull/19905/files/54ac1747..8931debe Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk=19905=01 - incr: https://webrevs.openjdk.org/?repo=jdk=19905=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19905.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19905/head:pull/19905 PR: https://git.openjdk.org/jdk/pull/19905
Re: RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment
On Wed, 26 Jun 2024 12:15:33 GMT, SendaoYan 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. > > Only change the testcase, the change has been verified locally, no risk. The GHA test runner report a failure, I think it's unrelated to this PR. 1. linux x86 fastdebug run test `compiler/interpreter/Test6833129.java` crash `oopDesc::size_given_klass`, seems similar to [JDK-8334760](https://bugs.openjdk.org/browse/JDK-8334760) - PR Comment: https://git.openjdk.org/jdk/pull/19905#issuecomment-2191995696
RFR: 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment
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. Only change the testcase, the change has been verified locally, no risk. - Commit messages: - 8335150: Test LogGeneratedClassesTest.java fails on rpmbuild mock enviroment Changes: https://git.openjdk.org/jdk/pull/19905/files Webrev: https://webrevs.openjdk.org/?repo=jdk=19905=00 Issue: https://bugs.openjdk.org/browse/JDK-8335150 Stats: 23 lines in 1 file changed: 15 ins; 3 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/19905.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19905/head:pull/19905 PR: https://git.openjdk.org/jdk/pull/19905