mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
![]() From: Simon McVittie <simon.mcvittie@collabora.co.uk> Date: Wed, 11 May 2016 13:52:56 +0100 Subject: syscall_sysctl test: correctly skip if CONFIG_SYSCTL_SYSCALL=n This test attempts to auto-skip the sysctl() part if that syscall was not compiled into the current kernel, via CONFIG_SYSCTL_SYSCALL=n. Unfortunately, this didn't actually work, for two reasons: * Because "${test} ro" wasn't in "&&", "||", a pipeline or an "if", and it had nonzero exit status, the trap on ERR was triggered, causing execution of the error_handler() shell function, which aborts the test with a failed status. The rules for ERR are the same as for "set -e", so we can circumvent it in the same ways. * Because sysctl_syscall.c prints its diagnostic message to stderr, but the $() operator only captures stdout, it never matched in the string comparison. This is easily solved by redirecting its stderr to stdout. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> |
||
---|---|---|
.. | ||
regression | ||
stress | ||
Makefile |