Skip to content

Commit ceac6c7

Browse files
Vladimir Petkoshipilev
authored andcommitted
8359735: [Ubuntu 25.10] java/lang/ProcessBuilder/Basic.java, java/lang/ProcessHandle/InfoTest.java fail due to rust-coreutils
Reviewed-by: rriggs Backport-of: c6ab63d306511c43622fc1f37e1aed6d8abaaa09
1 parent f98bbdf commit ceac6c7

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

test/jdk/java/lang/ProcessBuilder/Basic.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ private static class TrueExe {
696696
public static String path() { return path; }
697697
private static final String path = path0();
698698
private static String path0(){
699-
if (!Platform.isBusybox("/bin/true")) {
699+
if (!Files.isSymbolicLink(Paths.get("/bin/true"))) {
700700
return "/bin/true";
701701
} else {
702702
File trueExe = new File("true");
@@ -711,7 +711,7 @@ private static class FalseExe {
711711
public static String path() { return path; }
712712
private static final String path = path0();
713713
private static String path0(){
714-
if (!Platform.isBusybox("/bin/false")) {
714+
if (!Files.isSymbolicLink(Paths.get("/bin/false"))) {
715715
return "/bin/false";
716716
} else {
717717
File falseExe = new File("false");

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -295,10 +295,12 @@ public static void test3() {
295295
String expected = "sleep";
296296
if (Platform.isWindows()) {
297297
expected = "sleep.exe";
298-
} else if (Platform.isBusybox("/bin/sleep")) {
299-
// With busybox sleep is just a sym link to busybox.
300-
// The busbox executable is seen as ProcessHandle.Info command.
301-
expected = "busybox";
298+
} else if (Files.isSymbolicLink(Paths.get("/bin/sleep"))) {
299+
// Busybox sleep is a symbolic link to /bin/busybox.
300+
// Rust coreutils sleep is a symbolic link to coreutils
301+
// The busbox/coreutils executables are seen as ProcessHandle.Info command.
302+
Path executable = Files.readSymbolicLink(Paths.get("/bin/sleep"));
303+
expected = executable.getFileName().toString();
302304
}
303305
Assert.assertTrue(command.endsWith(expected), "Command: expected: \'" +
304306
expected + "\', actual: " + command);

0 commit comments

Comments
 (0)