From 7920db3da925bee4ed9e22cf71de12a4f04c280a Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Wed, 28 Jan 2015 14:43:32 +0200 Subject: [PATCH] tests: make ceph_watch_wait output watchfile content on failure It should help in troubleshooting remote test failures. Signed-off-by: Mykola Golub --- qa/workunits/cephtool/test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 6251af1af27..d3fe78c0ca3 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() -- 2.47.3