< prev index next >

test/jdk/java/lang/ProcessHandle/InfoTest.java

Print this page

        

@@ -296,11 +296,18 @@
                     Assert.assertNotNull(user);
                     Assert.assertEquals(user, whoami);
                 }
                 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);
 
                     // Verify the command exists and is executable
                     File exe = new File(command);
< prev index next >