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"