changeset 49264:d89c66395a1b

Fix jtreg test /java/lang/ProcessHandle/InfoTest.java
author asiebenborn <axel.siebenborn@sap.com>
date Wed, 21 Mar 2018 08:56:17 +0100
parents 305a5f1372f4
children cb442a8273cb
files test/jdk/java/lang/ProcessHandle/InfoTest.java
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/lang/ProcessHandle/InfoTest.java	Tue Mar 20 14:37:12 2018 +0100
+++ b/test/jdk/java/lang/ProcessHandle/InfoTest.java	Wed Mar 21 08:56:17 2018 +0100
@@ -298,7 +298,14 @@
                 }
                 if (info.command().isPresent()) {
                     String command = info.command().get();
-                    String expected = Platform.isWindows() ? "sleep.exe" : "sleep";
+                    String expected = "sleep";
+                    if (Platform.isWindows()) {
+                        expected = "sleep.exe";
+                    } else if (new File("/bin/busybox").exists()) {
+                        // With busybox sleep is just a sym link to busybox.
+                        // The busbox executable is seen as ProcessHandle.Info command.
+                        expected = "busybox";
+                    }
                     Assert.assertTrue(command.endsWith(expected), "Command: expected: \'" +
                             expected + "\', actual: " + command);