From a4e6076ee269b54a381417fe9443ab8e9f6f80da Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Wed, 17 Oct 2012 23:39:50 +0200 Subject: [PATCH] LU-1999 test: LW conn test should rely on debug logs Recovery-small test 6 should rely on lustre debug logs instead of dmesg since console messages are rate limited and might not be printed as expected by the test. The test should also be skipped if the server does not support lightweight connections (i.e. is older than 2.3.50). Signed-off-by: Johann Lombardi Change-Id: I78994831506e632f1730eb6f80fe145c7fc2cf3e Reviewed-on: http://review.whamcloud.com/4288 Tested-by: Hudson Reviewed-by: Li Wei Reviewed-by: Niu Yawei Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/recovery-small.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index a1ca789..aba5353 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -1497,12 +1497,17 @@ run_test 105 "IR: NON IR clients support" cleanup_106() { trap 0 umount_client $DIR2 + debugrestore } test_106() { # LU-1789 + [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.3.50) ]] || + { skip "Need MDS version at least 2.3.50"; return 0; } + #define OBD_FAIL_MDC_LIGHTWEIGHT 0x805 $LCTL set_param fail_loc=0x805 + debugsave trap cleanup_106 EXIT # enable lightweight flag on mdc connection @@ -1515,16 +1520,17 @@ test_106() { # LU-1789 touch $DIR2/$tfile || error "failed to create empty file" replay_barrier $SINGLEMDS + + $LCTL set_param debug=console + $LCTL clear facet_failover $SINGLEMDS # lightweight connection must be evicted touch -c $DIR2/$tfile || true - evicted=`dmesg | awk '/test 106/ {start = 1;} - /This client was evicted by .*MDT0000/ { - if (start) { - print; - } - }'` + $LCTL dk $TMP/lustre-log-$TESTNAME.log + evicted=`awk '/This client was evicted by .*MDT0000/ { + print; + }' $TMP/lustre-log-$TESTNAME.log` [ -z "$evicted" ] && error "lightweight client not evicted by mds" # and all operations performed by lightweight client should be -- 1.8.3.1