File: 199-scfilter

package info (click to toggle)
chrony 4.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,784 kB
  • sloc: ansic: 38,349; sh: 5,833; yacc: 862; makefile: 232
file content (26 lines) | stat: -rwxr-xr-x 549 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash

. ./test.common

check_chronyd_features SCFILTER || test_skip "SCFILTER support disabled"

[[ $CHRONYD_WRAPPER == *valgrind* ]] && test_skip "SCFILTER breaks valgrind"

test_start "system call filter in destructive tests"

for level in 1 2 -1 -2; 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