aboutsummaryrefslogtreecommitdiff
path: root/test/check-dumpevents.py
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2023-11-14 23:02:42 +0000
committerCy Schubert <cy@FreeBSD.org>2023-11-14 23:02:42 +0000
commit5223d1d95fddcef6f9a36e264a5800bd907ade8b (patch)
tree818b1eba912c588e39058586485699385c3179fe /test/check-dumpevents.py
parentcbc620a473ce23d882ba3e9f91ec0c6c12dcd239 (diff)
libevent: Import libevent 2.1.12vendor/libevent
Diffstat (limited to 'test/check-dumpevents.py')
-rwxr-xr-xtest/check-dumpevents.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/check-dumpevents.py b/test/check-dumpevents.py
index 16fe9bc92fdf..3e1df30c4f40 100755
--- a/test/check-dumpevents.py
+++ b/test/check-dumpevents.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python
#
# Post-process the output of test-dumpevents and check it for correctness.
#
@@ -15,12 +15,12 @@ try:
got_inserted_pos = text.index("Inserted events:\n")
got_active_pos = text.index("Active events:\n")
except ValueError:
- print >>sys.stderr, "Missing expected dividing line in dumpevents output"
+ sys.stderr.write("Missing expected dividing line in dumpevents output")
sys.exit(1)
if not (expect_inserted_pos < expect_active_pos <
got_inserted_pos < got_active_pos):
- print >>sys.stderr, "Sections out of order in dumpevents output"
+ sys.stderr.write("Sections out of order in dumpevents output")
sys.exit(1)
now,T= text[1].split()
@@ -45,10 +45,10 @@ cleaned_inserted = set( pat.sub(replace_time, s) for s in got_inserted
if "Internal" not in s)
if cleaned_inserted != want_inserted:
- print >>sys.stderr, "Inserted event lists were not as expected!"
+ sys.stderr.write("Inserted event lists were not as expected!")
sys.exit(1)
if set(got_active) != set(want_active):
- print >>sys.stderr, "Active event lists were not as expected!"
+ sys.stderr.write("Active event lists were not as expected!")
sys.exit(1)