Skip to content

Commit ca3359a

Browse files
author
duke
committed
Backport aec138886ec2dff765ed810059a1c7b9905c43ca
1 parent f597463 commit ca3359a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV2.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2020, Red Hat Inc.
3+
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
34
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
45
*
56
* This code is free software; you can redistribute it and/or modify it
@@ -447,13 +448,13 @@ private void testIOStat() {
447448
Metrics metrics = Metrics.systemMetrics();
448449
long oldVal = metrics.getBlkIOServiceCount();
449450
long newVal = getIoStatAccumulate(new String[] { "rios", "wios" });
450-
if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) {
451+
if (newVal < oldVal) {
451452
fail("io.stat->rios/wios: ", oldVal, newVal);
452453
}
453454

454455
oldVal = metrics.getBlkIOServiced();
455456
newVal = getIoStatAccumulate(new String[] { "rbytes", "wbytes" });
456-
if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) {
457+
if (newVal < oldVal) {
457458
fail("io.stat->rbytes/wbytes: ", oldVal, newVal);
458459
}
459460
}

0 commit comments

Comments
 (0)