CI Tests: Instead of waiting for a random event/hit, trigger one via ping
This commit is contained in:
parent
863bc06741
commit
3759fe484f
@ -29,16 +29,14 @@
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="systemtap"
|
||||
TMPFILE=$(mktemp)
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartTest
|
||||
# Here we rely on that netdev.receive gets hit immediately without us explicitly triggering it.
|
||||
# Not all rhel-7 stap versions have -T already, so we use -E instead.
|
||||
rlRun "stap -o $TMPFILE -ve 'probe netdev.receive{log(\"HIT\") exit()}' -E 'probe timer.s(30) {log(\"TIMEOUT\") exit()}'"
|
||||
rlRun "TMPFILE=$(mktemp)"
|
||||
rlRun "stap -o $TMPFILE -ve 'probe netdev.receive{log(\"HIT\") exit()}' -c 'ping -c1 localhost'"
|
||||
rlRun "cat $TMPFILE"
|
||||
rlRun "grep HIT $TMPFILE"
|
||||
rlRun "grep TIMEOUT $TMPFILE" 1
|
||||
rlRun "rm $TMPFILE"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
Loading…
Reference in New Issue
Block a user