From: Mykola Golub Date: Wed, 28 Jan 2015 12:43:32 +0000 (+0200) Subject: tests: make ceph_watch_wait output watchfile content on failure X-Git-Tag: v0.93~75 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7920db3da925bee4ed9e22cf71de12a4f04c280a;p=ceph.git tests: make ceph_watch_wait output watchfile content on failure It should help in troubleshooting remote test failures. Signed-off-by: Mykola Golub --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 6251af1af272..d3fe78c0ca33 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -183,7 +183,12 @@ function ceph_watch_wait() done kill $CEPH_WATCH_PID - grep "$regexp" $CEPH_WATCH_FILE + + if ! grep "$regexp" $CEPH_WATCH_FILE; then + echo "pattern ${regexp} not found in watch file. Full watch file content:" >&2 + cat $CEPH_WATCH_FILE >&2 + return 1 + fi } function test_mon_injectargs()