undo the changes to the modified earlier tests as timestamp presence is fully backwards compatible

This commit is contained in:
Ivan Bereziuk 2026-01-14 16:06:34 +01:00
parent 1f0213d59a
commit 784d74da38
2 changed files with 4 additions and 11 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2024, 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
@ -113,7 +113,6 @@ public class CodeCacheTest {
// Get output from dcmd (diagnostic command)
OutputAnalyzer output = executor.execute("Compiler.codecache");
Iterator<String> lines = output.asLines().iterator();
lines.next(); // skip timestamp
// Validate code cache segments
String line;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2023, 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
@ -54,18 +54,15 @@ public class ClassHierarchyTest {
// |--DcmdTestClass$$Lambda/4081552/0xa529fbb0
// > VM.class_hierarchy DcmdBaseClass
// 2025-01-01 10:59:59
// java.lang.Object/null
// |--DcmdBaseClass/0xa4abcd48
// > VM.class_hierarchy DcmdBaseClass -s
// 2025-01-01 10:59:59
// java.lang.Object/null
// |--DcmdBaseClass/0xa4abcd48
// | |--DcmdTestClass/0xa4abcd48
// > VM.class_hierarchy DcmdBaseClass -i -s
// 2025-01-01 10:59:59
// java.lang.Object/null
// |--DcmdBaseClass/0xa4abcd48
// | implements Intf2/0xa4abcd48 (declared intf)
@ -114,14 +111,13 @@ public class ClassHierarchyTest {
// Verify the output for the simple hierachry of just DcmdBaseClass.
output = executor.execute("VM.class_hierarchy DcmdBaseClass");
lines = output.asLines().iterator();
lines.next(); // skip timestamp
i = 0;
while (lines.hasNext()) {
String line = lines.next();
Matcher m = expected_lines[i].matcher(line);
i++;
if (!m.matches()) {
Assert.fail("Failed. Expected line #%d \"%s\" to match \"%s\"".formatted(i, line, expected_lines[i].pattern()));
Assert.fail("Failed to match line #" + i + ": " + line);
}
// Should only be two lines of output in this form.
if (i == 2) break;
@ -134,14 +130,13 @@ public class ClassHierarchyTest {
// Verify the output for the full hierarchy of DcmdBaseClass, but without interfaces.
output = executor.execute("VM.class_hierarchy DcmdBaseClass -s");
lines = output.asLines().iterator();
lines.next(); // skip timestamp
i = 0;
while (lines.hasNext()) {
String line = lines.next();
Matcher m = expected_lines[i].matcher(line);
i++;
if (!m.matches()) {
Assert.fail("Failed. Expected line #%d \"%s\" to match \"%s\"".formatted(i, line, expected_lines[i].pattern()));
Assert.fail("Failed to match line #" + i + ": " + line);
}
// "implements" lines should not be in this output.
if (i == 2 || i == 4) i += 2;
@ -154,7 +149,6 @@ public class ClassHierarchyTest {
// Verify the output for the full hierarchy of DcmdBaseClass, including interfaces.
output = executor.execute("VM.class_hierarchy DcmdBaseClass -i -s");
lines = output.asLines().iterator();
lines.next(); // skip timestamp
i = 0;
String classLoaderAddr = null;
while (lines.hasNext()) {