From: David Zafman Date: Fri, 28 Jul 2017 22:06:13 +0000 (-0700) Subject: qa: Dump logs after daemons are killed to make sure everything is flushed X-Git-Tag: v13.0.0~135^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4314cdd66648fa81a8eda18f4b81621fd0bde5e3;p=ceph.git qa: Dump logs after daemons are killed to make sure everything is flushed Signed-off-by: David Zafman --- diff --git a/qa/standalone/ceph-helpers.sh b/qa/standalone/ceph-helpers.sh index 219e30194202..de1d2fc5ae05 100755 --- a/qa/standalone/ceph-helpers.sh +++ b/qa/standalone/ceph-helpers.sh @@ -152,11 +152,15 @@ function test_setup() { # function teardown() { local dir=$1 + local dumplogs=$2 kill_daemons $dir KILL if [ `uname` != FreeBSD ] \ && [ $(stat -f -c '%T' .) == "btrfs" ]; then __teardown_btrfs $dir fi + if [ "$dumplogs" = "1" ]; then + display_logs $dir + fi rm -fr $dir rm -rf $(get_asok_dir) } @@ -1840,10 +1844,9 @@ function main() { if run $dir "$@" ; then code=0 else - display_logs $dir code=1 fi - teardown $dir || return 1 + teardown $dir $code || return 1 return $code }