diff --git a/tests/selabel-functions/runtest.sh b/tests/selabel-functions/runtest.sh index f9217b9..d03e964 100755 --- a/tests/selabel-functions/runtest.sh +++ b/tests/selabel-functions/runtest.sh @@ -26,6 +26,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="libselinux" @@ -185,7 +186,11 @@ EOF" rlRun "cat > $TmpDir/my_contexts < >(tee output >&2)" 0 + if rlIsFedora 27; then + rlRun "./test_open CTX_FILE $TmpDir/my_contexts NULL 1 0 2> >(tee output >&2)" 22 + else + rlRun "./test_open CTX_FILE $TmpDir/my_contexts NULL 1 0 2> >(tee output >&2)" 0 + fi rlRun "grep 'line 1 has invalid context my_user_u:my_role_r:my_type_t:s0' output" rlRun "cat > $TmpDir/my_contexts <= 26; then + if rlIsFedora ">=26"; then rlRun "strace -ostrace.out -s 64 ./test_exclude_list NULL $TmpDir" 139 "Calling selinux_restorecon_set_exclude_list with null as list" else rlRun "strace -ostrace.out -s 64 ./test_exclude_list NULL $TmpDir" 0 "Calling selinux_restorecon_set_exclude_list with null as list"