Skip to content

8359735: [Ubuntu 25.10] java/lang/ProcessBuilder/Basic.java, java/lang/ProcessHandle/InfoTest.java fail due to rust-coreutils #25838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/jdk/java/lang/ProcessBuilder/Basic.java
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ private static class TrueExe {
public static String path() { return path; }
private static final String path = path0();
private static String path0(){
if (!Platform.isBusybox("/bin/true")) {
if (!Files.isSymbolicLink(Paths.get("/bin/true"))) {
return "/bin/true";
} else {
File trueExe = new File("true");
Expand All @@ -711,7 +711,7 @@ private static class FalseExe {
public static String path() { return path; }
private static final String path = path0();
private static String path0(){
if (!Platform.isBusybox("/bin/false")) {
if (!Files.isSymbolicLink(Paths.get("/bin/false"))) {
return "/bin/false";
} else {
File falseExe = new File("false");
Expand Down
12 changes: 7 additions & 5 deletions test/jdk/java/lang/ProcessHandle/InfoTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -295,10 +295,12 @@ public static void test3() {
String expected = "sleep";
if (Platform.isWindows()) {
expected = "sleep.exe";
} else if (Platform.isBusybox("/bin/sleep")) {
// With busybox sleep is just a sym link to busybox.
// The busbox executable is seen as ProcessHandle.Info command.
expected = "busybox";
} else if (Files.isSymbolicLink(Paths.get("/bin/sleep"))) {
// Busybox sleep is a symbolic link to /bin/busybox.
// Rust coreutils sleep is a symbolic link to coreutils
// The busbox/coreutils executables are seen as ProcessHandle.Info command.
Path executable = Files.readSymbolicLink(Paths.get("/bin/sleep"));
expected = executable.getFileName().toString();
}
Assert.assertTrue(command.endsWith(expected), "Command: expected: \'" +
expected + "\', actual: " + command);
Expand Down