tests/selabel-functions: fixed condition for older Fedora and older rhel, newer versions convered by the else branch

This commit is contained in:
Dalibor Pospisil 2017-10-30 17:16:24 +01:00 committed by Petr Lautrbach
parent aba7ab1e5f
commit 2c7ab04eb8

View File

@ -186,10 +186,10 @@ EOF"
rlRun "cat > $TmpDir/my_contexts <<EOF rlRun "cat > $TmpDir/my_contexts <<EOF
$TmpDir my_user_u:my_role_r:my_type_t:s0 $TmpDir my_user_u:my_role_r:my_type_t:s0
EOF" EOF"
if rlIsFedora ">27"; then if rlIsFedora "<27" || rlIsRHEL "<=7"; 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 rlRun "./test_open CTX_FILE $TmpDir/my_contexts NULL 1 0 2> >(tee output >&2)" 0
else
rlRun "./test_open CTX_FILE $TmpDir/my_contexts NULL 1 0 2> >(tee output >&2)" 22
fi fi
rlRun "grep 'line 1 has invalid context my_user_u:my_role_r:my_type_t:s0' output" rlRun "grep 'line 1 has invalid context my_user_u:my_role_r:my_type_t:s0' output"