RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist

2024-05-25 Thread SendaoYan
Hi all, When there is no `/usr/bin/expect` in system, `throw new SkippedException` will not make the jvm exit in `@BeforeAll` junit stage, thus this will cause this testcase run failed. So I make change from `throw new SkippedException` to `System.exit` to avoid this issue. When use `System.ex

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist

2024-05-25 Thread Daniel Jeliński
On Sun, 26 May 2024 02:58:02 GMT, SendaoYan wrote: > Hi all, > When there is no `/usr/bin/expect` in system, `throw new SkippedException` > will not make the jvm exit in `@BeforeAll` junit stage, thus this will cause > this testcase run failed. So I make change from `throw new SkippedExceptio

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist

2024-05-25 Thread Alan Bateman
On Sun, 26 May 2024 06:06:50 GMT, Daniel Jeliński wrote: > SkippedException works with jtreg tests only. For jUnit you need to use > [Assumptions.abort](https://junit.org/junit5/docs/5.9.1/api/org.junit.jupiter.api/org/junit/jupiter/api/Assumptions.html#abort(java.lang.String)) Yes, the Assumpt

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist [v2]

2024-05-26 Thread SendaoYan
On Sun, 26 May 2024 06:16:44 GMT, Alan Bateman wrote: >> test/jdk/java/io/IO/IO.java line 64: >> >>> 62: expect = Paths.get("/usr/bin/expect"); // os-specific path >>> 63: if (!Files.exists(expect) || !Files.isExecutable(expect)) { >>> 64: System.out.print

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist [v2]

2024-05-26 Thread SendaoYan
> Hi all, > When there is no `/usr/bin/expect` in system, `throw new SkippedException` > will not make the jvm exit in `@BeforeAll` junit stage, thus this will cause > this testcase run failed. So I make change from `throw new SkippedException` > to `System.exit` to avoid this issue. When use

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist [v2]

2024-05-26 Thread Daniel Jeliński
On Sun, 26 May 2024 07:24:16 GMT, SendaoYan wrote: >> Hi all, >> When there is no `/usr/bin/expect` in system, `throw new SkippedException` >> will not make the jvm exit in `@BeforeAll` junit stage, thus this will cause >> this testcase run failed. So I make change from `throw new SkippedExce

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist [v2]

2024-05-26 Thread SendaoYan
On Sun, 26 May 2024 07:40:38 GMT, Daniel Jeliński wrote: > LGTM. I assume you verified it does the right thing. Thanks for the review and approved. The change has been verified. - PR Comment: https://git.openjdk.org/jdk/pull/19403#issuecomment-2132120584

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist [v2]

2024-05-26 Thread SendaoYan
On Sun, 26 May 2024 07:24:16 GMT, SendaoYan wrote: >> Hi all, >> When there is no `/usr/bin/expect` in system, `throw new SkippedException` >> will not make the jvm exit in `@BeforeAll` junit stage, thus this will cause >> this testcase run failed. So I make change from `throw new SkippedExce

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist [v2]

2024-05-27 Thread Pavel Rappo
On Sun, 26 May 2024 07:24:16 GMT, SendaoYan wrote: >> Hi all, >> When there is no `/usr/bin/expect` in system, `throw new SkippedException` >> will not make the jvm exit in `@BeforeAll` junit stage, thus this will cause >> this testcase run failed. So I make change from `throw new SkippedExce

Re: RFR: 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist [v2]

2024-05-27 Thread Daniel Jeliński
On Sun, 26 May 2024 07:24:16 GMT, SendaoYan wrote: >> Hi all, >> When there is no `/usr/bin/expect` in system, `throw new SkippedException` >> will not make the jvm exit in `@BeforeAll` junit stage, thus this will cause >> this testcase run failed. So I make change from `throw new SkippedExce