diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py index a581be6a29..24b3fba115 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -248,7 +248,7 @@ def do_run_test(self, test: str) -> TestResult: with f_test.open(encoding="utf-8") as f: try: - if f.readline() == '#!/usr/bin/env python3': + if f.readline().rstrip() == '#!/usr/bin/env python3': args.insert(0, self.env.python) except UnicodeDecodeError: # binary test? for future. pass