1
0
mirror of https://github.com/systemd/systemd synced 2025-10-06 00:13:24 +02:00

tests: run test with CAP_BPF

Add CAP_BPF to tests run with nspawn, so we don't have to use a VM
to test BPF calls.
This commit is contained in:
Matteo Croce
2025-06-25 14:42:48 +02:00
parent a80c06cf02
commit 9554ac3052

View File

@@ -617,6 +617,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 []),
] # fmt: skip
try: