public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: selinux-testsuite: consolidate network timeouts
@ 2026-09-11 13:17 Ondrej Mosnacek
  0 siblings, 0 replies; only message in thread
From: Ondrej Mosnacek @ 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 : 45f2938c61e0d25856b0253d7f77dcd2cfb62309
            Author : Ondrej Mosnacek <omosnace@redhat.com>
            Date   : 2019-12-11T09:22:45+01:00
            Stats  : +6/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/45f2938c61e0d25856b0253d7f77dcd2cfb62309?branch=pr775-checkpolicy-revdeps

            Log:
            selinux-testsuite: consolidate network timeouts

There are several places in the testuite that set timeouts for network
operations. They use different values in different places and
particularly for the SCTP test the value is too small on some machines
and often leads to false-positive test failures.

Since the right value depends on the environment, rather than proposing
to change the value to some guessed number upstream, let's just tweak
the number from the wrapper and suggest updating the numbers upstream
once we find a "proven" good value.

I'm setting the default to 4 secs - 1 second higher than the old value
in the inet_socket test, where we also (very) sporadically get failures.
The most problematic SCTP subtest had 2 seconds timeout before.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>

---
diff --git a/kernel/selinux-testsuite/runtest.sh b/kernel/selinux-testsuite/runtest.sh
index 006e1e1..b470a48 100755
--- a/kernel/selinux-testsuite/runtest.sh
+++ b/kernel/selinux-testsuite/runtest.sh
@@ -47,6 +47,9 @@ DEFAULT_PATCHES="208221 207155"
 # Optional test parameter - location of testuite git.
 GIT_URL=${GIT_URL:-"git://github.com/SELinuxProject/selinux-testsuite"}
 
+# Optional test parameter - timeout for detecting lost packets
+NETWORK_TIMEOUT=${NETWORK_TIMEOUT:-4}
+
 # Optional test parameter - branch containing tests.
 if [ -z "$GIT_BRANCH" ]; then
     GIT_BRANCH="$DEFAULT_COMMIT"
@@ -290,6 +293,9 @@ rlJournalStart
                     "Fix up Python shebang in overlay test"
             fi
 
+            rlRun "sed -i 's/tm\.tv_sec = [0-9]*;/tm.tv_sec = $NETWORK_TIMEOUT;/' ./tests/*/*.c" 0 \
+                "Tweak timeout in networking tests" # 2 secs is too little for SCTP test
+
             if kver_lt "3.10.0-349"; then
                 # c4684bbdac07 [security] selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID
                 # da74590f6501 [security] selinux: reject setexeccon() on MNT_NOSUID applications with -EACCES

^ 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: selinux-testsuite: consolidate network timeouts Ondrej Mosnacek

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