From: Andreas Dilger Date: Mon, 14 Sep 2020 23:07:17 +0000 (-0600) Subject: LU-13449 tests: fix recovery-small test_140b check X-Git-Tag: 2.14.0-RC2~4 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=463a70eb645df7519efeab49e558cbe6f4ecafa5 LU-13449 tests: fix recovery-small test_140b check The recovery timer is printed in MM:SS format, but the current test is unhappy if the SS part is printed as "08" or "09" since that is interpreted by bash as an invalid octal number. Also, the current check does not handle the case if recovery is longer than a minute. Change the code to convert MM:SS back to seconds for the comparison. Test-Parameters: trivial testlist=recovery-small env=ONLY=140 Signed-off-by: Andreas Dilger Change-Id: Ie1dc77a88bb0e8fd5025f2b5ca57d4a61d3ebbe5 Reviewed-on: https://review.whamcloud.com/39909 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index 675f616..8b4b594 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -2966,11 +2966,12 @@ test_140b() { replay_barrier mds1 umount_mds_client fail mds1 + # Lustre: tfs-MDT0000: Recovery over after 0:03, of 2 clients 2 rec... local recovery=$(do_facet mds1 dmesg | - awk -F: '/Recovery over after/ { print $4 }' | - cut -d, -f1 | tail -1) - (( $recovery < $TIMEOUT*2 )) || - error "recovery took too long $recovery > $((TIMEOUT * 2))" + awk '/Recovery over after/ { print $6 }' | tail -1 | + awk -F: '{ print $1 * 60 + $2 }') + (( recovery < TIMEOUT * 2 + 5 )) || + error "recovery took too long $recovery > $((TIMEOUT * 2 + 5))" } run_test 140b "local mount is excluded from recovery"