1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-21 18:03:41 +03:00

test: make sure ping works for unprivileged users

(cherry picked from commit f087837c46d77745425fd9b84f1de9e5703836af)
(cherry picked from commit bcd2cf893281c927c33c3d0ff5ea04aab22b16c8)
(cherry picked from commit eb914ee546049a4cde144c5930a8369a0fc3067d)
This commit is contained in:
Frantisek Sumsal 2023-06-12 14:13:25 +02:00 committed by Luca Boccassi
parent 23ef4b4f16
commit 44ae33e03c

View File

@ -8,9 +8,14 @@ MAX_QUEUE_SIZE=${NPROC:-2}
TESTS_GLOB=${TESTS_GLOB:-test-*}
mapfile -t TEST_LIST < <(find /usr/lib/systemd/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