Skip to content

Commit db78d3f

Browse files
author
Roman Marchenko
committed
8359735: [Ubuntu 25.10] java/lang/ProcessBuilder/Basic.java, java/lang/ProcessHandle/InfoTest.java fail due to rust-coreutils
Backport-of: c6ab63d
1 parent a5e2cf2 commit db78d3f

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ private static class TrueExe {
699699
public static String path() { return path; }
700700
private static final String path = path0();
701701
private static String path0(){
702-
if (!Platform.isBusybox("/bin/true")) {
702+
if (!Files.isSymbolicLink(Paths.get("/bin/true"))) {
703703
return "/bin/true";
704704
} else {
705705
File trueExe = new File("true");
@@ -714,7 +714,7 @@ private static class FalseExe {
714714
public static String path() { return path; }
715715
private static final String path = path0();
716716
private static String path0(){
717-
if (!Platform.isBusybox("/bin/false")) {
717+
if (!Files.isSymbolicLink(Paths.get("/bin/false"))) {
718718
return "/bin/false";
719719
} else {
720720
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
@@ -294,10 +294,12 @@ public static void test3() {
294294
String expected = "sleep";
295295
if (Platform.isWindows()) {
296296
expected = "sleep.exe";
297-
} else if (Platform.isBusybox("/bin/sleep")) {
298-
// With busybox sleep is just a sym link to busybox.
299-
// The busbox executable is seen as ProcessHandle.Info command.
300-
expected = "busybox";
297+
} else if (Files.isSymbolicLink(Paths.get("/bin/sleep"))) {
298+
// Busybox sleep is a symbolic link to /bin/busybox.
299+
// Rust coreutils sleep is a symbolic link to coreutils
300+
// The busbox/coreutils executables are seen as ProcessHandle.Info command.
301+
Path executable = Files.readSymbolicLink(Paths.get("/bin/sleep"));
302+
expected = executable.getFileName().toString();
301303
}
302304
Assert.assertTrue(command.endsWith(expected), "Command: expected: \'" +
303305
expected + "\', actual: " + command);

0 commit comments

Comments
 (0)