From: Daniel P. Berrangé Date: Tue, 15 Jul 2025 14:30:23 +0000 (+0100) Subject: iotests/check: always enable all python warnings X-Git-Tag: v10.1.1~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd6c96219cd7aa957479169e772b1c68983a9419;p=thirdparty%2Fqemu.git iotests/check: always enable all python warnings Of most importance is that this gives us a heads-up if anything we rely on has been deprecated. The default python behaviour only emits a warning if triggered from __main__ which is very limited. Setting the env variable further ensures that any python child processes will also display warnings. Signed-off-by: Daniel P. Berrangé (cherry picked from commit 9a494d83538680651197651031375c2b6fa2490b) Signed-off-by: Michael Tokarev --- diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 545f9ec7bdd..d9b7c1d5989 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -21,6 +21,7 @@ import sys import argparse import shutil from pathlib import Path +import warnings from findtests import TestFinder from testenv import TestEnv @@ -137,6 +138,9 @@ def make_argparser() -> argparse.ArgumentParser: if __name__ == '__main__': + warnings.simplefilter("default") + os.environ["PYTHONWARNINGS"] = "default" + args = make_argparser().parse_args() env = TestEnv(source_dir=args.source_dir,