From: DaanDeMeyer Date: Fri, 11 Jul 2025 12:58:47 +0000 (+0200) Subject: test: Fix --capability=CAP_BPF condition X-Git-Tag: v258-rc1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42c288dfd800a3645fa3ec864b7341b7f88562ff;p=thirdparty%2Fsystemd.git test: Fix --capability=CAP_BPF condition We also run in a VM if we're not running as root, yet we weren't checking this when deciding whether to pass --capability=CAP_BPF or not. Let's fix that. Follow up for 9554ac305239c7baea02d112d2da72b7a97fce41 --- diff --git a/test/integration-tests/integration-test-wrapper.py b/test/integration-tests/integration-test-wrapper.py index 99fc420e9a9..e31815524d2 100755 --- a/test/integration-tests/integration-test-wrapper.py +++ b/test/integration-tests/integration-test-wrapper.py @@ -572,6 +572,8 @@ def main() -> None: else: firmware = args.firmware + vm = args.vm or os.getuid() != 0 or os.getenv('TEST_PREFER_QEMU', '0') == '1' + cmd = [ args.mkosi, '--directory', os.fspath(args.mkosi_dir), @@ -616,9 +618,8 @@ def main() -> None: ), '--credential', f"journal.storage={'persistent' if sys.stdin.isatty() else args.storage}", *(['--runtime-build-sources=no', '--register=no'] if not sys.stdin.isatty() else []), - 'vm' if args.vm or os.getuid() != 0 or os.getenv('TEST_PREFER_QEMU', '0') == '1' else 'boot', - *(['--', '--capability=CAP_BPF'] \ - if not args.vm and os.getenv('TEST_PREFER_QEMU', '0') == '0' else []), + 'vm' if vm else 'boot', + *(['--', '--capability=CAP_BPF'] if not vm else []), ] # fmt: skip try: