]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: make ceph_watch_wait output watchfile content on failure
authorMykola Golub <mgolub@mirantis.com>
Wed, 28 Jan 2015 12:43:32 +0000 (14:43 +0200)
committerSage Weil <sage@redhat.com>
Mon, 9 Feb 2015 06:12:55 +0000 (22:12 -0800)
It should help in troubleshooting remote test failures.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
qa/workunits/cephtool/test.sh

index 6251af1af272d8ed12ac3d4b305e7a7ee116aa99..d3fe78c0ca3339caa6f87860cde02ecb6e6e96c0 100755 (executable)
@@ -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()