Merge pull request #17132 from keszybz/test-suite-update

Test suite updates
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-09-25 13:39:24 +02:00 committed by GitHub
commit 581b2c7359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 11 additions and 9 deletions

View File

@ -318,7 +318,7 @@ static void test_protect_sysctl(void) {
if (pid == 0) {
#if defined __NR__sysctl && __NR__sysctl >= 0
assert_se(syscall(__NR__sysctl, NULL) < 0);
assert_se(errno == EFAULT);
assert_se(IN_SET(errno, EFAULT, ENOSYS));
#endif
assert_se(seccomp_protect_sysctl() >= 0);

View File

@ -60,4 +60,4 @@ check_result_qemu() {
return $_ret
}
do_test "$@" 24
do_test "$@" 02

View File

@ -76,4 +76,4 @@ test_setup_cleanup() {
cleanup_initdir
}
do_test "$@" 02
do_test "$@" 24

View File

@ -7,7 +7,7 @@ if [ $# -gt 0 ]; then
else
args="setup run clean-again"
fi
args_no_clean=$(sed -r 's/(^| )clean($| )/ /g' <<<$args)
args_no_clean=$(sed -r 's/\bclean\b//g' <<<$args)
do_clean=$( [ "$args" = "$args_no_clean" ]; echo $? )
ninja -C "$BUILD_DIR"
@ -26,6 +26,8 @@ if [ $do_clean = 1 ]; then
for TEST in TEST-??-* ; do
( set -x ; make -C "$TEST" "BUILD_DIR=$BUILD_DIR" clean )
done
[ -n "$args_no_clean" ] || exit 0
fi
pass_blacklist() {

View File

@ -1,8 +1,7 @@
[Unit]
Description=TEST-02-CRYPTSETUP
After=multi-user.target
Description=TEST-02-UNITTESTS
[Service]
ExecStartPre=rm -f /failed /testok
ExecStart=sh -x -e -c 'mountpoint /var; systemctl --state=failed --no-legend --no-pager >/failed; echo OK >/testok'
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot

View File

@ -1,7 +1,8 @@
[Unit]
Description=TEST-24-UNIT-TESTS
Description=TEST-24-CRYPTSETUP
After=multi-user.target
[Service]
ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
ExecStart=sh -x -e -c 'mountpoint /var; systemctl --state=failed --no-legend --no-pager >/failed; echo OK >/testok'
Type=oneshot