mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8368885: NMT CommandLine tests can check for error better
Reviewed-by: phubner, azafari, shade
This commit is contained in:
parent
f49849a5ed
commit
84e5d63b9f
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 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
|
||||
@ -35,13 +35,14 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class CommandLineDetail {
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
|
||||
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||
"-XX:NativeMemoryTracking=detail",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldNotContain("error");
|
||||
output.shouldHaveExitValue(0);
|
||||
}
|
||||
public static void main(String args[]) throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||
"-Xlog:nmt=warning",
|
||||
"-XX:NativeMemoryTracking=detail",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldNotContain("NMT initialization failed");
|
||||
output.shouldNotContain("Could not create the Java Virtual Machine.");
|
||||
output.shouldHaveExitValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 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
|
||||
@ -35,13 +35,14 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class CommandLineSummary {
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
|
||||
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||
"-XX:NativeMemoryTracking=summary",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldNotContain("error");
|
||||
output.shouldHaveExitValue(0);
|
||||
}
|
||||
public static void main(String args[]) throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||
"-Xlog:nmt=warning",
|
||||
"-XX:NativeMemoryTracking=summary",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldNotContain("NMT initialization failed");
|
||||
output.shouldNotContain("Could not create the Java Virtual Machine.");
|
||||
output.shouldHaveExitValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user