Skip to content
Open
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
9 changes: 5 additions & 4 deletions test/hotspot/jtreg/containers/docker/TestPids.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -113,12 +113,13 @@ private static void checkResult(List<String> lines, String lineMarker, String ex

Asserts.assertEquals(parts.length, 2);
String actual = parts[1].replaceAll("\\s","");
// Unlimited pids leads on some setups not to "max" in the output, but to a high number
if (expectedValue.equals("max")) {
if (actual.equals("max")) {
System.out.println("Found expected max for unlimited pids value.");
// Unlimited pids accept max or -1
if (actual.equals("max") || actual.equals("-1")) {
System.out.println("Found expected " + actual + " for unlimited pids value.");
} else {
try {
// Unlimited pids leads on some setups not to "max" in the output, but to a high number
int ai = Integer.parseInt(actual);
if (ai > 20000) {
System.out.println("Limit value " + ai + " got accepted as unlimited, log line was " + line);
Expand Down