testsuite: adapt to "fgrep" deprecation

Since for some reason upstream grep deprecated "fgrep", and for some reason
fedora packagers followed suit, some these tests scripts fail with the goofy
"fgrep: warning: fgrep is obsolescent; using grep -F" warning.
This commit is contained in:
Frank Ch. Eigler 2024-01-25 16:42:18 -05:00
parent 5c095346d4
commit 6b9b658442
9 changed files with 10 additions and 10 deletions

View File

@ -35,7 +35,7 @@ LOG2=$(mktemp)
rlJournalStart
rlPhaseStartTest
rlRun "mount | fgrep -i 'debugfs on'"
rlRun "mount | grep -F -i 'debugfs on'"
rlRun "cat /sys/kernel/debug/tracing/tracing_on | grep '^1$'"
rlRun "journalctl > $LOG1"
rlRun "stap -g -k -v hellotrace.stp"

View File

@ -34,7 +34,7 @@ PACKAGE="systemtap"
rlJournalStart
rlPhaseStartSetup
TESTS=$(mktemp)
rlRun "rpm -qa | fgrep systemtap-testsuite"
rlRun "rpm -qa | grep -F systemtap-testsuite"
rlPhaseEnd
rpm -qa | grep systemtap-testsuite | xargs rpm -ql \

View File

@ -140,7 +140,7 @@ EOF
# gcc 8.2.1->8.3.1 change related to systemtap debuginfo regression in rhel-8.1.0, kernel -84 -> -85
# https://bugzilla.redhat.com/show_bug.cgi?id=1709831#c17
# ( fgrep RESULT: /tmp/typescript | sort -u )
# ( grep -F RESULT: /tmp/typescript | sort -u )
rlPhaseStart FAIL 'case-6'
rlRun "stap $p -vp4 -e 'probe sunrpc.clnt.shutdown_client { println(servername) }'"
rlPhaseEnd

View File

@ -181,7 +181,7 @@ rlJournalStart
# Protected from elision --------------------------------------
rlPhaseStart FAIL "test 14 protected from elision"
rlRun "stap -v -e 'probe nfs.fop.fsync {} probe begin {print(\"Protected from elision\")}' -c true |\
fgrep 'Protected from elision'"
grep -F 'Protected from elision'"
rlPhaseEnd
# bz544207 ----------------------------------------------------

View File

@ -42,7 +42,7 @@ rlJournalStart
rlRun "diff $dmesg1 $dmesg2 |& tee $diff"
# Reproduced on hpe-moonshot-02-c02.hpe1.lab.eng.bos.redhat.com
# using kernel-4.18.0-167.el8.aarch64+debug and systemtap-4.2-1.el8.aarch64.
rlRun "fgrep -i rcu $diff" 1
rlRun "grep -F -i rcu $diff" 1
rm $dmesg{1,2} $diff
rlPhaseEnd
rlJournalPrintText

View File

@ -33,7 +33,7 @@ PACKAGE="systemtap"
rlJournalStart
rlPhaseStartTest
EXTRA=""
arch | fgrep ppc64le && EXTRA='-P'
arch | grep -F ppc64le && EXTRA='-P'
# We rely on (and check for) units to be kB
rlRun "test \"$( awk '/KernelStack/ {print $3}' /proc/meminfo )\" == \"kB\""

View File

@ -33,10 +33,10 @@ PACKAGE="systemtap"
rlJournalStart
rlPhaseStartTest
EXTRA=''
arch | fgrep ppc64le && EXTRA="-P"
arch | grep -F ppc64le && EXTRA="-P"
rlRun "FILE_NR1=$(awk '{print $1}' /proc/sys/fs/file-nr)"
REPRODUCER=reproducer.stp
rlRun "stap -g -w $EXTRA --dump-functions | fgrep task_exe_file || REPRODUCER=reproducer2.stp"
rlRun "stap -g -w $EXTRA --dump-functions | grep -F task_exe_file || REPRODUCER=reproducer2.stp"
rlRun "stap -w $EXTRA $REPRODUCER -c 'bash ./trigger.sh' -o /dev/null"
rlRun "FILE_NR2=$(awk '{print $1}' /proc/sys/fs/file-nr)"
rlRun "test $((FILE_NR2 - 1000)) -le $FILE_NR1"

View File

@ -39,7 +39,7 @@ rlJournalStart
# trigger it here, but commit respective to this comment removes it.
# https://bugzilla.redhat.com/show_bug.cgi?id=1732514#c11
rlRun "rpm -qa | fgrep -e systemtap-runtime-java -e byteman -e openjdk | sort"
rlRun "rpm -qa | grep -F -e systemtap-runtime-java -e byteman -e openjdk | sort"
rlRun "stap-prep"

View File

@ -48,7 +48,7 @@ rlJournalStart
fi
rlRun "useradd $TESTUSER" 0,9
rlRun "su $TESTUSER -c 'which stap'"
rlRun "rpm -qa | fgrep -e dyninst -e systemtap | sort"
rlRun "rpm -qa | grep -F -e dyninst -e systemtap | sort"
rlPhaseEnd
rlPhaseStartSetup