[CRIU] [PATCH] zdtm: add debug to investigate fails of maps007
Andrey Vagin
avagin at openvz.org
Fri Feb 27 05:28:18 PST 2015
Reported-by: Mr Jenkins
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/zdtm.sh | 7 ++-----
test/zdtm/live/transition/maps007.c | 2 ++
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 4081705..f2641fe 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -800,7 +796,7 @@ EOF
fi
sltime=1
- for i in `seq 50`; do
+ for i in `seq 200`; do
kill -0 $PID > /dev/null 2>&1 || break
echo Waiting...
sleep 0.$sltime
@@ -825,6 +821,7 @@ EOF
fi
cat $test.out
+ [ $i -gt 50 ] && return 2 # waiting too long
cat $test.out | grep -q PASS || return 2
[ "$CLEANUP" -ne 0 ] && rm -rf --one-file-system `dirname $ddump`
echo "Test: $test, Result: PASS"
diff --git a/test/zdtm/live/transition/maps007.c b/test/zdtm/live/transition/maps007.c
index 68ac431..b5afe1a 100644
--- a/test/zdtm/live/transition/maps007.c
+++ b/test/zdtm/live/transition/maps007.c
@@ -84,6 +84,8 @@ int main(int argc, char **argv)
if (!futex_get(&shm->stop))
/* shm->delta must be always bigger than MAX_DELTA */
futex_wait_while_lt(&shm->delta, MAX_DELTA + 2);
+ else if (count % 100 == 0)
+ test_msg("count %d delta %d\n", count, futex_get(&shm->delta)); /* heartbeat */
if (futex_get(&shm->stop) && atomic_get(&shm->delta.raw) == MAX_DELTA)
break;
--
1.9.3
More information about the CRIU
mailing list