mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 07:35:06 -05:00
test: rework seccomp testing
Instead of a single test with enabled seccomp, rerun all other non-destructive and destructive tests for each seccomp level.
This commit is contained in:
24
test/system/199-scfilter
Executable file
24
test/system/199-scfilter
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. ./test.common
|
||||
|
||||
check_chronyd_features SCFILTER || test_skip "SCFILTER support disabled"
|
||||
|
||||
test_start "system call filter in destructive tests"
|
||||
|
||||
for level in "-1" "1"; do
|
||||
test_message 1 1 "level $level:"
|
||||
for test in 1[0-8][0-9]-*[^_]; do
|
||||
test_message 2 0 "$test"
|
||||
TEST_SCFILTER=$level "./$test" > /dev/null 2> /dev/null
|
||||
result=$?
|
||||
|
||||
if [ $result != 0 ] && [ $result != 9 ] ; then
|
||||
test_bad
|
||||
test_fail
|
||||
fi
|
||||
test_ok
|
||||
done
|
||||
done
|
||||
|
||||
test_pass
|
||||
Reference in New Issue
Block a user