From 90fa1e13dea0adc10fa60d917d53a2fcebed3486 Mon Sep 17 00:00:00 2001 From: sendaoYan Date: Sun, 26 May 2024 10:52:26 +0800 Subject: [PATCH] 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist Signed-off-by: sendaoYan --- test/jdk/java/io/IO/IO.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/jdk/java/io/IO/IO.java b/test/jdk/java/io/IO/IO.java index 9b35fe1ab8104..6bbf9a2772463 100644 --- a/test/jdk/java/io/IO/IO.java +++ b/test/jdk/java/io/IO/IO.java @@ -46,7 +46,7 @@ * @bug 8305457 * @summary java.io.IO tests * @library /test/lib - * @run junit IO + * @run junit/othervm IO */ public class IO { @@ -55,12 +55,14 @@ public class IO { public class OSSpecificTests { private static Path expect; + static final int JCK_STATUS_BASE = 95; @BeforeAll public static void prepareTTY() { expect = Paths.get("/usr/bin/expect"); // os-specific path if (!Files.exists(expect) || !Files.isExecutable(expect)) { - throw new SkippedException("'" + expect + "' not found"); + System.out.println("jtreg.SkippedException: '" + expect + "' not found"); + System.exit(JCK_STATUS_BASE); } }