update test

This commit is contained in:
kieran-farrell 2026-02-03 11:56:53 +00:00
parent 926fc92018
commit e9ed58ada8
2 changed files with 6 additions and 2 deletions

View File

@ -2612,6 +2612,6 @@ void os::print_open_file_descriptors(outputStream* st) {
st->print_cr("Open File Descriptors: %d", nfiles);
#else
st->print_cr("Open File Descriptors: unknown");
st->print_cr("Open File Descriptors: unknown");
#endif
}

View File

@ -33,7 +33,6 @@ import java.util.List;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.Platform;
import jdk.test.lib.Utils;
/*
* @test
@ -182,5 +181,10 @@ public class TestJcmdSanity {
output.shouldNotContain("*** Handler was modified!");
output.shouldNotContain("*** Expected: "); // e.g. *** Expected: javaSignalHandler in ...
}
// Should find file descriptor counting on Mac and Linux
if (Platform.isLinux() || Platform.isOSX()) {
output.shouldMatch("Open File Descriptors: \\d+");
}
}
}