8356945: jdk/jfr/event/os/TestProcessStart failed on Windows Subsystem for Linux

Reviewed-by: egahlin
This commit is contained in:
Chihiro Ito 2025-05-21 14:05:33 +00:00
parent a07150af11
commit b63ec0ab58

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 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
@ -51,11 +51,12 @@ public class TestProcessStart {
recording.start();
List<String> commandList = new ArrayList<>();
if (Platform.isWindows()) {
commandList.add("help");
commandList.add("dir");
} else {
commandList.add("ls");
commandList.add("*.jfr");
}
commandList.add("*.jfr");
ProcessBuilder pb = new ProcessBuilder(commandList);
pb.directory(new File(".").getAbsoluteFile());
Process p = pb.start();