public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: selinux-testsuite: consolidate network timeouts
Date: Fri, 11 Sep 2026 13:17:37 GMT	[thread overview]
Message-ID: <178913265743.1.15801325950416242178.tests-selinux-45f2938c61e0@fedoraproject.org> (raw)

            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

                 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=178913265743.1.15801325950416242178.tests-selinux-45f2938c61e0@fedoraproject.org \
    --to=omosnace@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