Re: [PATCH v3 1/9] KVM: selftest: Create KVM selftest runner

Vipin Sharma
2025-09-30T22:23:54Z

On 2025-09-30 09:36:27, Vipin Sharma wrote:
> diff --git a/tools/testing/selftests/kvm/runner/__main__.py b/tools/testing/selftests/kvm/runner/__main__.py
> new file mode 100644
> index 000000000000..8d1a78450e41
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/runner/__main__.py
> +def main():
> + args = cli()
> + setup_logging()
> + testcases = fetch_testcases(args)
> + return TestRunner(testcases).start()
> +
> +
> +if __name__ == "__main__":
> + sys.exit(main())

Sean, as discussed offline, following diff adds a minimum python version
check. Runner can run on python 3.6, it might go lower but I haven't checked.
Linux kernel minimum requirement for python is 3.9
(Documentation/process/changes.rst)

diff --git a/tools/testing/selftests/kvm/runner/__main__.py b/tools/testing/selftests/kvm/runner/__main__.py
index 8d1a78450e41..db87f426331d 100644
--- a/tools/testing/selftests/kvm/runner/__main__.py
+++ b/tools/testing/selftests/kvm/runner/__main__.py
@@ -91,4 +91,9 @@ def main():

if __name__ == "__main__":
+ PYTHON_VERSION = (3, 6)
+ if sys.version_info < PYTHON_VERSION:
+ print(f"Minimum required python version {PYTHON_VERSION}, found {sys.version}")
+ sys.exit(1)
+
sys.exit(main())