CI Tests: Multiple updates
tests/Regression/RHEL6Feature-cpp-methods: Fix locale/LANG dependent sort collation prob tests/Regression/python-probing: Make sure needed debuginfo is in place tests/Regression/wrong-data-returned-by-nfs-commit-done: Refactor, improve clranup, simplify
This commit is contained in:
parent
6e53120fd1
commit
12975603f1
@ -1,70 +0,0 @@
|
|||||||
StandaloneFunction start: _Z18StandaloneFunctionv
|
|
||||||
StandaloneFunction end: main
|
|
||||||
StandaloneFunction start: _ZN5inner18StandaloneFunctionEv
|
|
||||||
inner::StandaloneFunction start: _ZN5inner18StandaloneFunctionEv
|
|
||||||
StandaloneFunction end: main
|
|
||||||
inner::StandaloneFunction end: main
|
|
||||||
StandaloneFunction start: _ZN9moreinner18StandaloneFunctionEv
|
|
||||||
moreinner::StandaloneFunction start: _ZN9moreinner18StandaloneFunctionEv
|
|
||||||
StandaloneFunction end: main
|
|
||||||
moreinner::StandaloneFunction end: main
|
|
||||||
puMethod start: _ZN6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
stMethod start: _ZN6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
puMethod start: _ZN5inner6CLASS18puMethodEv
|
|
||||||
inner::puMethod start: _ZN5inner6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN5inner6CLASS18prMethodEv
|
|
||||||
inner::prMethod start: _ZN5inner6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN5inner6CLASS18puMethodEv
|
|
||||||
inner::prMethod end: _ZN5inner6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
inner::puMethod end: main
|
|
||||||
stMethod start: _ZN5inner6CLASS18stMethodEv
|
|
||||||
inner::stMethod start: _ZN5inner6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
inner::stMethod end: main
|
|
||||||
puMethod start: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
moreinner::puMethod start: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN9moreinner6CLASS18prMethodEv
|
|
||||||
moreinner::prMethod start: _ZN9moreinner6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
moreinner::prMethod end: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
moreinner::puMethod end: main
|
|
||||||
stMethod start: _ZN9moreinner6CLASS18stMethodEv
|
|
||||||
moreinner::stMethod start: _ZN9moreinner6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
moreinner::stMethod end: main
|
|
||||||
puMethod start: _ZN6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
stMethod start: _ZN6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
puMethod start: _ZN5inner6CLASS18puMethodEv
|
|
||||||
inner::puMethod start: _ZN5inner6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN5inner6CLASS18prMethodEv
|
|
||||||
inner::prMethod start: _ZN5inner6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN5inner6CLASS18puMethodEv
|
|
||||||
inner::prMethod end: _ZN5inner6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
inner::puMethod end: main
|
|
||||||
stMethod start: _ZN5inner6CLASS18stMethodEv
|
|
||||||
inner::stMethod start: _ZN5inner6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
inner::stMethod end: main
|
|
||||||
puMethod start: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
moreinner::puMethod start: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN9moreinner6CLASS18prMethodEv
|
|
||||||
moreinner::prMethod start: _ZN9moreinner6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
moreinner::prMethod end: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
moreinner::puMethod end: main
|
|
||||||
stMethod start: _ZN9moreinner6CLASS18stMethodEv
|
|
||||||
moreinner::stMethod start: _ZN9moreinner6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
moreinner::stMethod end: main
|
|
@ -1,83 +0,0 @@
|
|||||||
StandaloneFunction start: _Z18StandaloneFunctionv
|
|
||||||
StandaloneFunction end: main
|
|
||||||
StandaloneFunction start: _ZN5inner18StandaloneFunctionEv
|
|
||||||
inner::StandaloneFunction start: _ZN5inner18StandaloneFunctionEv
|
|
||||||
StandaloneFunction end: main
|
|
||||||
inner::StandaloneFunction end: main
|
|
||||||
StandaloneFunction start: _ZN9moreinner18StandaloneFunctionEv
|
|
||||||
moreinner::StandaloneFunction start: _ZN9moreinner18StandaloneFunctionEv
|
|
||||||
StandaloneFunction end: main
|
|
||||||
moreinner::StandaloneFunction end: main
|
|
||||||
puMethod start: _ZN6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
stMethod start: _ZN6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
puMethod start: _ZN5inner6CLASS18puMethodEv
|
|
||||||
inner::puMethod start: _ZN5inner6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN5inner6CLASS18prMethodEv
|
|
||||||
inner::prMethod start: _ZN5inner6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN5inner6CLASS18puMethodEv
|
|
||||||
inner::prMethod end: _ZN5inner6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
inner::puMethod end: main
|
|
||||||
stMethod start: _ZN5inner6CLASS18stMethodEv
|
|
||||||
inner::stMethod start: _ZN5inner6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
inner::stMethod end: main
|
|
||||||
puMethod start: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
moreinner::puMethod start: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN9moreinner6CLASS18prMethodEv
|
|
||||||
moreinner::prMethod start: _ZN9moreinner6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
moreinner::prMethod end: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
moreinner::puMethod end: main
|
|
||||||
stMethod start: _ZN9moreinner6CLASS18stMethodEv
|
|
||||||
moreinner::stMethod start: _ZN9moreinner6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
moreinner::stMethod end: main
|
|
||||||
puMethod start: _ZN6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
stMethod start: _ZN6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
puMethod start: _ZN5inner6CLASS18puMethodEv
|
|
||||||
inner::puMethod start: _ZN5inner6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN5inner6CLASS18prMethodEv
|
|
||||||
inner::prMethod start: _ZN5inner6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN5inner6CLASS18puMethodEv
|
|
||||||
inner::prMethod end: _ZN5inner6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
inner::puMethod end: main
|
|
||||||
stMethod start: _ZN5inner6CLASS18stMethodEv
|
|
||||||
inner::stMethod start: _ZN5inner6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
inner::stMethod end: main
|
|
||||||
puMethod start: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
moreinner::puMethod start: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
prMethod start: _ZN9moreinner6CLASS18prMethodEv
|
|
||||||
moreinner::prMethod start: _ZN9moreinner6CLASS18prMethodEv
|
|
||||||
prMethod end: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
moreinner::prMethod end: _ZN9moreinner6CLASS18puMethodEv
|
|
||||||
puMethod end: main
|
|
||||||
moreinner::puMethod end: main
|
|
||||||
stMethod start: _ZN9moreinner6CLASS18stMethodEv
|
|
||||||
moreinner::stMethod start: _ZN9moreinner6CLASS18stMethodEv
|
|
||||||
stMethod end: main
|
|
||||||
moreinner::stMethod end: main
|
|
||||||
__StandaloneFunction=0
|
|
||||||
__hitcount=70
|
|
||||||
__inner_StandaloneFunction=0
|
|
||||||
__moreinner_StandaloneFunction=0
|
|
||||||
__stMethod=0
|
|
||||||
__inner_CLASS1_stMethod=0
|
|
||||||
__moreinner_star_stMethod=0
|
|
||||||
__prMethod=0
|
|
||||||
__inner_CLASS1_prMethod=0
|
|
||||||
__moreinner_star_prMethod=0
|
|
||||||
__puMethod=0
|
|
||||||
__inner_CLASS1_puMethod=0
|
|
||||||
__moreinner_star_puMethod=0
|
|
@ -1,70 +0,0 @@
|
|||||||
StandaloneFunction start: StandaloneFunction
|
|
||||||
StandaloneFunction end: StandaloneFunction
|
|
||||||
StandaloneFunction start: StandaloneFunction
|
|
||||||
inner::StandaloneFunction start: inner::StandaloneFunction
|
|
||||||
inner::StandaloneFunction end: inner::StandaloneFunction
|
|
||||||
StandaloneFunction end: StandaloneFunction
|
|
||||||
StandaloneFunction start: StandaloneFunction
|
|
||||||
moreinner::StandaloneFunction start: moreinner::StandaloneFunction
|
|
||||||
moreinner::StandaloneFunction end: moreinner::StandaloneFunction
|
|
||||||
StandaloneFunction end: StandaloneFunction
|
|
||||||
puMethod start: puMethod
|
|
||||||
prMethod start: prMethod
|
|
||||||
prMethod end: prMethod
|
|
||||||
puMethod end: puMethod
|
|
||||||
stMethod start: stMethod
|
|
||||||
stMethod end: stMethod
|
|
||||||
puMethod start: puMethod
|
|
||||||
inner::puMethod start: inner::CLASS1::puMethod
|
|
||||||
prMethod start: prMethod
|
|
||||||
inner::prMethod start: inner::CLASS1::prMethod
|
|
||||||
inner::prMethod end: inner::CLASS1::prMethod
|
|
||||||
prMethod end: prMethod
|
|
||||||
inner::puMethod end: inner::CLASS1::puMethod
|
|
||||||
puMethod end: puMethod
|
|
||||||
stMethod start: stMethod
|
|
||||||
inner::stMethod start: inner::CLASS1::stMethod
|
|
||||||
inner::stMethod end: inner::CLASS1::stMethod
|
|
||||||
stMethod end: stMethod
|
|
||||||
puMethod start: puMethod
|
|
||||||
moreinner::puMethod start: moreinner::CLASS1::puMethod
|
|
||||||
prMethod start: prMethod
|
|
||||||
moreinner::prMethod start: moreinner::CLASS1::prMethod
|
|
||||||
moreinner::prMethod end: moreinner::CLASS1::prMethod
|
|
||||||
prMethod end: prMethod
|
|
||||||
moreinner::puMethod end: moreinner::CLASS1::puMethod
|
|
||||||
puMethod end: puMethod
|
|
||||||
stMethod start: stMethod
|
|
||||||
moreinner::stMethod start: moreinner::CLASS1::stMethod
|
|
||||||
moreinner::stMethod end: moreinner::CLASS1::stMethod
|
|
||||||
stMethod end: stMethod
|
|
||||||
puMethod start: puMethod
|
|
||||||
prMethod start: prMethod
|
|
||||||
prMethod end: prMethod
|
|
||||||
puMethod end: puMethod
|
|
||||||
stMethod start: stMethod
|
|
||||||
stMethod end: stMethod
|
|
||||||
puMethod start: puMethod
|
|
||||||
inner::puMethod start: inner::CLASS1::puMethod
|
|
||||||
prMethod start: prMethod
|
|
||||||
inner::prMethod start: inner::CLASS1::prMethod
|
|
||||||
inner::prMethod end: inner::CLASS1::prMethod
|
|
||||||
prMethod end: prMethod
|
|
||||||
inner::puMethod end: inner::CLASS1::puMethod
|
|
||||||
puMethod end: puMethod
|
|
||||||
stMethod start: stMethod
|
|
||||||
inner::stMethod start: inner::CLASS1::stMethod
|
|
||||||
inner::stMethod end: inner::CLASS1::stMethod
|
|
||||||
stMethod end: stMethod
|
|
||||||
puMethod start: puMethod
|
|
||||||
moreinner::puMethod start: moreinner::CLASS1::puMethod
|
|
||||||
prMethod start: prMethod
|
|
||||||
moreinner::prMethod start: moreinner::CLASS1::prMethod
|
|
||||||
moreinner::prMethod end: moreinner::CLASS1::prMethod
|
|
||||||
prMethod end: prMethod
|
|
||||||
moreinner::puMethod end: moreinner::CLASS1::puMethod
|
|
||||||
puMethod end: puMethod
|
|
||||||
stMethod start: stMethod
|
|
||||||
moreinner::stMethod start: moreinner::CLASS1::stMethod
|
|
||||||
moreinner::stMethod end: moreinner::CLASS1::stMethod
|
|
||||||
stMethod end: stMethod
|
|
@ -30,16 +30,13 @@
|
|||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
PACKAGE="systemtap"
|
PACKAGE="systemtap"
|
||||||
|
export LANG=C
|
||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
|
|
||||||
rlPhaseStartSetup
|
rlPhaseStartSetup
|
||||||
rlRun "stap-prep" 0-255
|
rlRun "stap-prep" 0-255
|
||||||
rlRun "g++ -O0 classes.cpp -o classes -g"
|
rlRun "g++ -O0 classes.cpp -o classes -g"
|
||||||
|
|
||||||
rlIsRHEL 6 && COMPAT='--compatible=1.8'
|
|
||||||
# rlIsRHEL 7 && cp -f golden.el7.out golden.out
|
|
||||||
# rlIsRHEL 8 && cp -f golden.el8.out golden.out
|
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest
|
rlPhaseStartTest
|
||||||
@ -50,22 +47,25 @@ rlPhaseStartTest
|
|||||||
# rlRun "diff golden.out output.out"
|
# rlRun "diff golden.out output.out"
|
||||||
rlRun "grep ^__ output.out | sort > summary.out"
|
rlRun "grep ^__ output.out | sort > summary.out"
|
||||||
|
|
||||||
|
# The way sort works across test systems may differ
|
||||||
|
# esp wrt whether capitals go first or not, so let's sort
|
||||||
|
# the golden_summary.out first using actual defaults
|
||||||
|
# slash LANG etc...
|
||||||
|
rlRun "sort golden_summary.out > golden_summary.sort"
|
||||||
|
|
||||||
# RHEL6: covert hex to dec:
|
# RHEL6: covert hex to dec:
|
||||||
rlRun "sed -i 's/0x0/0/' summary.out"
|
rlRun "sed -i 's/0x0/0/' summary.out"
|
||||||
rlRun "sed -i 's/0x46/70/' summary.out"
|
rlRun "sed -i 's/0x46/70/' summary.out"
|
||||||
|
|
||||||
# Sanity check
|
# Sanity check
|
||||||
rlRun "diff golden_summary.out summary.out" || (
|
rlRun "diff golden_summary.sort summary.out" || (
|
||||||
rlRun "cat golden_summary.out"
|
rlRun "cat golden_summary.out"
|
||||||
rlRun "cat summary.out"
|
rlRun "cat summary.out"
|
||||||
)
|
)
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
rlPhaseStartCleanup
|
||||||
rlFileSubmit golden.out
|
rlRun "rm -f golden_summary.sort output.out summary.out classes"
|
||||||
rlFileSubmit output.out
|
|
||||||
|
|
||||||
rlRun "rm -f output.out classes"
|
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlJournalPrintText
|
rlJournalPrintText
|
||||||
|
@ -9,10 +9,13 @@ framework: beakerlib
|
|||||||
recommend:
|
recommend:
|
||||||
- python
|
- python
|
||||||
- python-debuginfo
|
- python-debuginfo
|
||||||
|
- python3-debuginfo
|
||||||
|
- python3.9-debuginfo
|
||||||
- systemtap
|
- systemtap
|
||||||
- python2
|
- python2
|
||||||
- python3
|
- python3
|
||||||
- elfutils
|
- elfutils
|
||||||
|
- yum-utils
|
||||||
duration: 15m
|
duration: 15m
|
||||||
extra-summary: /CoreOS/python/Sanity/systemtap
|
extra-summary: /CoreOS/python/Sanity/systemtap
|
||||||
extra-task: /CoreOS/python/Sanity/systemtap
|
extra-task: /CoreOS/python/Sanity/systemtap
|
||||||
|
@ -48,6 +48,10 @@ rlJournalStart
|
|||||||
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
|
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
|
||||||
rlRun "cp list.stp top.stp test.py $TmpDir" 0 "Copying scripts"
|
rlRun "cp list.stp top.stp test.py $TmpDir" 0 "Copying scripts"
|
||||||
rlRun "pushd $TmpDir"
|
rlRun "pushd $TmpDir"
|
||||||
|
|
||||||
|
# Install needed debuginfo, best effort
|
||||||
|
rlRun "L=$(stap -p2 -e 'probe python.function.entry {exit()}' | awk -F\" '/process/ {print $2}')" 0-255
|
||||||
|
rlRun "debuginfo-install -y $L" 0-255
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "Verifying ELF file for presence of .probes section"
|
rlPhaseStartTest "Verifying ELF file for presence of .probes section"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define TEST_DIR "/systemtap-sts-nfs-share-and-mount-tmpdir/sts_mount"
|
#define TEST_DIR "/systemtap-sts-nfs-share-and-mount-tmpdir2/sts_mount"
|
||||||
|
|
||||||
static int create_and_write(char *file_name);
|
static int create_and_write(char *file_name);
|
||||||
static int read_file(char *file_name);
|
static int read_file(char *file_name);
|
@ -31,42 +31,48 @@
|
|||||||
. /etc/os-release || exit 1
|
. /etc/os-release || exit 1
|
||||||
|
|
||||||
PACKAGE="systemtap"
|
PACKAGE="systemtap"
|
||||||
|
export NFS_TMP="$HOME/systemtap-sts-nfs-share-and-mount-tmpdir2"
|
||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartSetup
|
rlPhaseStartSetup
|
||||||
rlRun "rpm -qf $(which --skip-alias stap)"
|
rlRun "rpm -qf $(which --skip-alias stap)"
|
||||||
rlRun "TMPDIR=$(mktemp -d)"
|
rlRun "TMPDIR=$(mktemp -d)"
|
||||||
rlRun "cp -r testpro $TMPDIR"
|
rlRun "cp nfs.proc.commit_done.c nfs.proc.commit_done.stp $TMPDIR/"
|
||||||
rlRun "pushd $TMPDIR/testpro/"
|
rlRun "pushd $TMPDIR"
|
||||||
rlPhaseEnd
|
rlRun "mkdir -p ${NFS_TMP}/sts_share ${NFS_TMP}/sts_mount"
|
||||||
|
|
||||||
rlPhaseStart FAIL "Systemtap sanity check"
|
|
||||||
rlRun "stap --version"
|
|
||||||
rlRun "stap -v -e 'probe kernel.function(\"vfs_read\"){ exit() }'"
|
|
||||||
rlRun "uname -a"
|
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStart FAIL "Build testing binary, prepare nfs environment"
|
rlPhaseStart FAIL "Build testing binary, prepare nfs environment"
|
||||||
rlRun "make"
|
rlRun "systemctl stop nfs-server.service"
|
||||||
rlRun "./test-for-nfs"
|
rlRun "systemctl stop rpcbind.service"
|
||||||
|
rlRun "sleep 3"
|
||||||
|
rlRun "systemctl start rpcbind.service"
|
||||||
|
rlRun "sleep 3"
|
||||||
|
rlRun "systemctl start nfs-server.service"
|
||||||
|
rlRun "sleep 3"
|
||||||
|
rlRun "systemctl status nfs-server.service"
|
||||||
|
rlRun "systemctl status rpcbind.service"
|
||||||
|
rlRun "exportfs -i -o 'rw,async,no_root_squash' 127.0.0.1:${NFS_TMP}/sts_share"
|
||||||
|
rlRun "mount -vvvvv -t nfs 127.0.0.1:${NFS_TMP}/sts_share ${NFS_TMP}/sts_mount"
|
||||||
|
rlRun "gcc nfs.proc.commit_done.c -o nfs.proc.commit_done"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest
|
rlPhaseStartTest
|
||||||
if stap -p2 nfs.proc.commit_done.stp >&/dev/null; then
|
ps="-P"
|
||||||
rlRun "stap --prologue-searching=never --poison-cache -vc './nfs.proc.commit_done' nfs.proc.commit_done.stp 2>&1 | tee testout.log"
|
stap -p2 nfs.proc.commit_done.stp >&/dev/null && ps=''
|
||||||
else
|
rlRun "stap $ps --poison-cache -vc './nfs.proc.commit_done' nfs.proc.commit_done.stp 2>&1 | tee testout.log"
|
||||||
rlRun "stap --prologue-searching=always --poison-cache -vc './nfs.proc.commit_done' nfs.proc.commit_done.stp 2>&1 | tee testout.log"
|
|
||||||
fi
|
|
||||||
rlRun "grep -qP 'nfs.proc.commit_done server_ip:\ \d+\.\d+\.\d+\.\d+' testout.log"
|
rlRun "grep -qP 'nfs.proc.commit_done server_ip:\ \d+\.\d+\.\d+\.\d+' testout.log"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStart WARN "Clean the nfs environment up"
|
rlPhaseStart WARN "Clean the nfs environment up"
|
||||||
rlRun "./test-for-nfs -c"
|
rlRun "umount -l ${NFS_TMP}/sts_mount"
|
||||||
|
rlRun "systemctl stop nfs-server.service"
|
||||||
|
rlRun "systemctl stop rpcbind.service"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
rlPhaseStartCleanup
|
||||||
rlRun "popd"
|
rlRun "popd"
|
||||||
rlRun "rm -r $TMPDIR"
|
rlRun "rm -r $TMPDIR $NFS_TMP"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
rlJournalPrintText
|
rlJournalPrintText
|
||||||
rlJournalEnd
|
rlJournalEnd
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
CFLAGS+= -Wall
|
|
||||||
|
|
||||||
SRCS = $(wildcard *.c)
|
|
||||||
TARGETS = $(patsubst %.c,%,$(SRCS))
|
|
||||||
|
|
||||||
all: $(TARGETS)
|
|
||||||
|
|
||||||
install:
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(TARGETS)
|
|
@ -1,91 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export NFS_TMP="$HOME/systemtap-sts-nfs-share-and-mount-tmpdir"
|
|
||||||
|
|
||||||
nfs_service()
|
|
||||||
{
|
|
||||||
local ret
|
|
||||||
local status="$1"
|
|
||||||
local OS_VER="$2"
|
|
||||||
|
|
||||||
case "$status" in
|
|
||||||
restart)
|
|
||||||
ps -ef | grep "nfsd" | grep -v grep > /dev/null 2>&1
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "nfsd already running!!"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
/bin/systemctl restart nfs-server.service
|
|
||||||
ret=$?
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
/bin/systemctl stop nfs-server.service
|
|
||||||
ret=$?
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Error: nfs_service [stop|restart]"
|
|
||||||
ret=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return $ret
|
|
||||||
}
|
|
||||||
|
|
||||||
clean_nfs_env()
|
|
||||||
{
|
|
||||||
umount "$NFS_TMP"/sts_mount
|
|
||||||
/usr/sbin/exportfs -u 127.0.0.1:"$NFS_TMP"/sts_share
|
|
||||||
rm -rf "$NFS_TMP"
|
|
||||||
nfs_service stop
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
echo "Info: The nfs env for test clean successfully."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
create_nfs_env()
|
|
||||||
{
|
|
||||||
nfs_service restart
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
mkdir -p "$NFS_TMP"/sts_share
|
|
||||||
mkdir -p "$NFS_TMP"/sts_mount
|
|
||||||
|
|
||||||
/usr/sbin/exportfs -i -o 'rw,async,no_root_squash' 127.0.0.1:"$NFS_TMP"/sts_share
|
|
||||||
mount -t nfs 127.0.0.1:"$NFS_TMP"/sts_share "$NFS_TMP"/sts_mount
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ $# -gt 2 ]; then
|
|
||||||
echo "Usage: test-for-nfs [-c]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
-c)
|
|
||||||
clean_nfs_env
|
|
||||||
ret=$?
|
|
||||||
if [ $ret -ne 0 ]; then
|
|
||||||
echo "Error: cleaning the nfs env for test failed."
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
create_nfs_env
|
|
||||||
ret=$?
|
|
||||||
if [ $ret -eq 0 ]; then
|
|
||||||
echo "Info: The nfs env for test create successfully."
|
|
||||||
else
|
|
||||||
echo "Error: creating the nfs env for test failed."
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $ret
|
|
Loading…
Reference in New Issue
Block a user