summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-06-12 14:13:25 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-06-13 10:15:27 +0200
commitf087837c46d77745425fd9b84f1de9e5703836af (patch)
tree8d0dd62b576e0423af59aecc71387fab52935de0 /test
parenttest: copy file xattrs (if any) as well (diff)
downloadsystemd-f087837c46d77745425fd9b84f1de9e5703836af.tar.xz
systemd-f087837c46d77745425fd9b84f1de9e5703836af.zip
test: make sure ping works for unprivileged users
Diffstat (limited to 'test')
-rwxr-xr-xtest/units/testsuite-02.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/units/testsuite-02.sh b/test/units/testsuite-02.sh
index f0e0f091fd..4c4479287f 100755
--- a/test/units/testsuite-02.sh
+++ b/test/units/testsuite-02.sh
@@ -22,9 +22,14 @@ NPROC=$(nproc)
MAX_QUEUE_SIZE=${NPROC:-2}
mapfile -t TEST_LIST < <(find /usr/lib/systemd/tests/unit-tests/ -maxdepth 1 -type f -name "${TESTS_GLOB}")
-# reset state
+# Reset state
rm -fv /failed-tests /skipped-tests /skipped
+if ! systemd-detect-virt -qc; then
+ # Make sure ping works for unprivileged users (for test-bpf-firewall)
+ sysctl net.ipv4.ping_group_range="0 2147483647"
+fi
+
# Check & report test results
# Arguments:
# $1: test path