diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index 163f76118..57e45b93d 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -128,8 +128,8 @@ GITHUB_ACTIONS = 'GITHUB_ACTIONS' in os.environ or 'CIBUILDWHEEL' in os.environ CI_TESTING = APPVEYOR or GITHUB_ACTIONS COVERAGE = 'COVERAGE_RUN' in os.environ -if LINUX: - with open('/proc/self/cmdline') as f: +if LINUX and GITHUB_ACTIONS: + with open('/proc/1/cmdline') as f: QEMU_USER = "/bin/qemu-" in f.read() else: QEMU_USER = False