Commit 21d94e00 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm.sh: dump traffic for *tcpbuf* tests

Sometimes these tests don't pass successfully and we need more
information to investigate the problem.

https://bugzilla.openvz.org/show_bug.cgi?id=2676Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 27f9b033
......@@ -169,6 +169,7 @@ EXCLUDE_PATTERN=""
CLEANUP=0
PAGE_SERVER=0
PS_PORT=12345
TCPDUMP_PID=
check_mainstream()
{
......@@ -207,6 +208,9 @@ exit_callback()
[[ -n "$ZDTM_FAILED" && -n "$DUMP_ARCHIVE" ]] && tar -czf $DUMP_ARCHIVE dump
[ -n "$TMPFS_DUMP" ] &&
umount -l "$TMPFS_DUMP"
[ -n "$TCPDUMP_PID" ] &&
kill $TCPDUMP_PID
}
trap exit_callback EXIT
......@@ -368,6 +372,11 @@ EOF
args="-n uts -n ipc -n net -n pid -n mnt --root $ZDTM_ROOT --pidfile $TPID $args"
fi
echo $tname | grep -q tcpbuf && {
tcpdump -w dump/$tname/$PID/tcpdump.data -i lo &
TCPDUMP_PID=$!
}
for i in `seq $ITERATIONS`; do
ddump=dump/$tname/$PID/$i
......@@ -453,6 +462,10 @@ EOF
sleep 0.$sltime
[ $sltime -lt 9 ] && sltime=$((sltime+1))
done
[ -n "$TCPDUMP_PID" ] && kill $TCPDUMP_PID
TCPDUMP_PID=""
cat $test.out
cat $test.out | grep -q PASS || return 2
[ "$CLEANUP" -ne 0 ] && rm -rf `dirname $ddump`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment