From 945d92f333666af878eff047a2b91330dd1b310d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 30 Aug 2023 13:57:22 +0200 Subject: [PATCH] Fixing sanity-test /Sanity/sanity-test --- Sanity/sanity-test/runtest.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Sanity/sanity-test/runtest.sh b/Sanity/sanity-test/runtest.sh index 623c147..95b7147 100755 --- a/Sanity/sanity-test/runtest.sh +++ b/Sanity/sanity-test/runtest.sh @@ -32,14 +32,21 @@ PACKAGE="iperf3" rlJournalStart rlPhaseStartSetup - rlAssertRequired + rlAssertRpm "$PACKAGE" rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" rlPhaseEnd rlPhaseStartTest rlRun -s "iperf3 -c localhost" 1 "Client should fail when no server is listening." - rlAssertGrep "iperf3: error - unable to connect to server: Connection refused|iperf3: error - unable to send control message: Bad file descriptor" $rlRun_LOG -E + if rlIsFedora; then + MESSAGE="iperf3: error - unable to connect to server - server may have stopped running or use a different port, firewall issue, etc.: Connection refused" + elif rlIsRHEL '>=9' || rlIsCentOS '>=9'; then + MESSAGE="iperf3: error - unable to send control message: Bad file descriptor" + else + MESSAGE="iperf3: error - unable to connect to server: Connection refused" + fi + rlAssertGrep "$MESSAGE" $rlRun_LOG -E rm -f $rlRun_LOG rlRun "iperf3 -D -s -1"