public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: libselinux/selinux_restorecon-functions: remove checks that expect segfault
@ 2026-09-11 13:17 Jan Zarsky
  0 siblings, 0 replies; only message in thread
From: Jan Zarsky @ 2026-09-11 13:17 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 727fea5d64d9e95af5df42f588c18acec0d2342a
            Author : Jan Zarsky <jzarsky@redhat.com>
            Date   : 2018-06-04T12:46:24+02:00
            Stats  : +0/-30 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/727fea5d64d9e95af5df42f588c18acec0d2342a?branch=pr775-checkpolicy-revdeps

            Log:
            libselinux/selinux_restorecon-functions: remove checks that expect segfault

Several checks are unnecessary, because they test undefined behaviour
which often changes.

---
diff --git a/libselinux/selinux_restorecon-functions/runtest.sh b/libselinux/selinux_restorecon-functions/runtest.sh
index 1cacacf..dbaec0f 100755
--- a/libselinux/selinux_restorecon-functions/runtest.sh
+++ b/libselinux/selinux_restorecon-functions/runtest.sh
@@ -103,10 +103,6 @@ rlJournalStart
     rlPhaseStartTest "invalid path"
         rlRun "./test_restorecon EMPTY" 255 "Calling selinux_restorecon with empty path"
 
-        # should probably return both 139 (segfault) or 255, but it is not so important
-        rlRun "./test_restorecon NULL" 139,255 "Calling selinux_restorecon with null as path"
-        rlRun "./test_restorecon NULL REALPATH" 139,255 "Calling selinux_restorecon with null as path and REALPATH flag"
-        
         rlRun "./test_restorecon /nonexistent" 255 "Calling selinux_restorecon with nonexisting path"
     rlPhaseEnd
 
@@ -281,26 +277,6 @@ rlJournalStart
         rlRun "grep \"\\\"$TmpDir/a/bfile\\\"\"     strace_xattr.out"
         rlRun "grep \"\\\"$TmpDir/a/b/cfile\\\"\"   strace_xattr.out"
 
-        ### selinux_restorecon_set_exclude_list expects
-        ### "a pointer containing a NULL terminated list of one or more directories"
-        ### therefore this test doesn't make sense now
-        ### # null as list
-        ### 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"
-        ### 
-        ###     rlLogInfo "Checking lgetxattr calls"
-        ###     rlRun "grep lgetxattr strace.out | grep security.selinux > strace_xattr.out"
-        ### 
-        ###     rlRun "grep \"\\\"$TmpDir\\\"\"             strace_xattr.out"
-        ###     rlRun "grep \"\\\"$TmpDir/a\\\"\"           strace_xattr.out"
-        ###     rlRun "grep \"\\\"$TmpDir/afile\\\"\"       strace_xattr.out"
-        ###     rlRun "grep \"\\\"$TmpDir/a/b\\\"\"         strace_xattr.out"
-        ###     rlRun "grep \"\\\"$TmpDir/a/bfile\\\"\"     strace_xattr.out"
-        ###     rlRun "grep \"\\\"$TmpDir/a/b/cfile\\\"\"   strace_xattr.out"
-        ### fi
-
         # exclude $TmpDir/a
         rlRun "strace -ostrace.out -s 64 ./test_exclude_list $TmpDir/a $TmpDir" 0 "Calling selinux_restorecon_set_exclude_list"
 
@@ -323,12 +299,6 @@ rlJournalStart
     rlPhaseStartTest "selinux_restorecon_set_sehandle"
         createTestFiles
 
-        # null sehandle
-        rlRun "./test_sehandle NULL $TmpDir" 139,255 "Calling selinux_restorecon_set_sehandle with null handle"
-
-        # invalid sehandle
-        rlRun "./test_sehandle INVALID $TmpDir" 139,255 "Calling selinux_restorecon_set_sehandle with invalid handle"
-
         # default sehandle
         rlRun "strace -ostrace.out -s 64 ./test_sehandle DEFAULT $TmpDir" 0 "Calling selinux_restorecon_set_sehandle with default handle"
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:17 [tests/selinux] pr775-checkpolicy-revdeps: libselinux/selinux_restorecon-functions: remove checks that expect segfault Jan Zarsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox