diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-08-01 17:44:51 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-08-01 19:36:52 +0200 |
commit | 46f0a4e7ac97b47c5718b718e3c6db4a8a8e78a0 (patch) | |
tree | 7b08e0532ee2031cb86598ee758c4dbe251788ef /src/test/test-bpf-devices.c | |
parent | Merge pull request #28620 from yuwata/meson-use-template-part5 (diff) | |
download | systemd-46f0a4e7ac97b47c5718b718e3c6db4a8a8e78a0.tar.xz systemd-46f0a4e7ac97b47c5718b718e3c6db4a8a8e78a0.zip |
test: skip tests earlier when we do not have enough privileges
Hopefully fixes #28624.
Diffstat (limited to '')
-rw-r--r-- | src/test/test-bpf-devices.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/test-bpf-devices.c b/src/test/test-bpf-devices.c index 0e1287eac4..438e49bb18 100644 --- a/src/test/test-bpf-devices.c +++ b/src/test/test-bpf-devices.c @@ -272,9 +272,11 @@ int main(int argc, char *argv[]) { r = enter_cgroup_subroot(&cgroup); if (r == -ENOMEDIUM) return log_tests_skipped("cgroupfs not available"); + if (r < 0) + return log_tests_skipped_errno(r, "Failed to prepare cgroup subtree"); r = bpf_devices_supported(); - if (!r) + if (r == 0) return log_tests_skipped("BPF device filter not supported"); assert_se(r == 1); |