public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Zarsky <jzarsky@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: libselinux/selinux_restorecon-functions: remove checks that expect segfault
Date: Fri, 11 Sep 2026 13:17:16 GMT	[thread overview]
Message-ID: <178913263693.1.10312453954138267116.tests-selinux-727fea5d64d9@fedoraproject.org> (raw)

            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"
 

                 reply	other threads:[~2026-09-11 13:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178913263693.1.10312453954138267116.tests-selinux-727fea5d64d9@fedoraproject.org \
    --to=jzarsky@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox