From d38a3cc5f4742c3bcd831a1299c8416c00b5be0e Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 9 Aug 2026 18:43:47 +0200 Subject: [PATCH] tests: benchmark crud json-lines: io throughput may round to 0 io is int(bytes/second); with the test's 1-byte samples it is 0 whenever an operation takes >= 1 second, which happens on slow, loaded CI VMs (seen on OpenBSD with 4 pytest-xdist workers). Co-Authored-By: Claude Fable 5 --- src/borg/testsuite/archiver/benchmark_cmd_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/borg/testsuite/archiver/benchmark_cmd_test.py b/src/borg/testsuite/archiver/benchmark_cmd_test.py index f4c16185c9..41399f656c 100644 --- a/src/borg/testsuite/archiver/benchmark_cmd_test.py +++ b/src/borg/testsuite/archiver/benchmark_cmd_test.py @@ -44,7 +44,9 @@ def test_benchmark_crud_json_lines(archiver, monkeypatch): assert isinstance(entry["time"], float) assert entry["time"] > 0 assert isinstance(entry["io"], int) - assert entry["io"] > 0 + # io is int(bytes/second); with this test's 1-byte samples it is 0 + # whenever the operation takes >= 1s (seen on a loaded OpenBSD CI VM). + assert entry["io"] >= 0 def test_benchmark_cpu(archiver, monkeypatch):