mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
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=2676 Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
27f9b0335d
commit
21d94e0086
13
test/zdtm.sh
13
test/zdtm.sh
@@ -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`
|
||||
|
Reference in New Issue
Block a user