42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
# runtest.sh of /tools/systemtap/Sanity/quick-smoke-test
|
||
|
|
||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||
|
|
||
|
export DEBUGINFOD_URLS="https://debuginfod.stg.fedoraproject.org/ $DEBUGINFOD_URLS"
|
||
|
export DEBUGINFOD_TIMEOUT=300
|
||
|
# export DEBUGINFOD_PROGRESS=1
|
||
|
|
||
|
|
||
|
# On Rawhide, the running kernel packages won't probably be avail in
|
||
|
# configured repos. Debuginfo isn't a problem, we access that using
|
||
|
# the debuginfod.
|
||
|
__install_deps ()
|
||
|
{
|
||
|
set -xe
|
||
|
TMPD=$(mktemp -d)
|
||
|
pushd $TMPD
|
||
|
koji download-build --rpm kernel-`uname -r` --arch `uname -i`
|
||
|
koji download-build --rpm kernel-devel-`uname -r` --arch `uname -i`
|
||
|
koji download-build --rpm kernel-modules-`uname -r` --arch `uname -i`
|
||
|
dnf -y install kernel{,-devel,-modules}-`uname -r`.rpm
|
||
|
popd
|
||
|
rm -rf $TMPD
|
||
|
set +xe
|
||
|
}
|
||
|
|
||
|
rlJournalStart
|
||
|
rlPhaseStartTest
|
||
|
rlRun "rpm -qa | egrep '^(kernel|systemtap)' | sort"
|
||
|
rlRun "uname -r"
|
||
|
rlRun "stap-prep || __install_deps"
|
||
|
rlRun "stap-prep"
|
||
|
rlRun "stap -L 'process(\"stap\").mark(\"*\")' | grep pass"
|
||
|
rlRun "stap -v --example helloworld.stp"
|
||
|
rlRun "stap -v -T 10 -p4 -e 'probe kernel.function(\"do_exit\") {println(\$\$vars)}'"
|
||
|
rlRun "stap -v -T 60 -e 'probe kernel.function(\"vfs_read\"){ println(\$\$vars); exit() }'"
|
||
|
rlPhaseEnd
|
||
|
rlJournalPrintText
|
||
|
rlJournalEnd
|