From 3274e573957e8b8a067ae28c3f7d7788d40f310e Mon Sep 17 00:00:00 2001 From: James Nunez Date: Fri, 30 Oct 2020 11:44:00 -0600 Subject: [PATCH 1/1] LU-10059 tests: sanityn 32a error messages There are three checks for file size in sanityn test 32a that, if they fail, have the same error message "wrong file size". Let's add additional information to the error messages to help distinguish the different errors. Test-Parameters: trivial testlist=sanityn Signed-off-by: James Nunez Change-Id: I71aae8de67125d5be93c4fb4728b2c20d26df49c Reviewed-on: https://review.whamcloud.com/40496 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: Vikentsi Lapa --- lustre/tests/sanityn.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 442b6e2..d09a62f 100755 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -877,13 +877,15 @@ test_32a() { # bug 11270 log "checking cached lockless truncate" $TRUNCATE $DIR1/$tfile 8000000 - $CHECKSTAT -s 8000000 $DIR2/$tfile || error "wrong file size" + $CHECKSTAT -s 8000000 $DIR2/$tfile || + error "cached truncate - wrong file size" [ $(calc_stats $OSC.*.${OSC}_stats lockless_truncate) -ne 0 ] || error "cached truncate isn't lockless" log "checking not cached lockless truncate" $TRUNCATE $DIR2/$tfile 5000000 - $CHECKSTAT -s 5000000 $DIR1/$tfile || error "wrong file size" + $CHECKSTAT -s 5000000 $DIR1/$tfile || + error "not cached truncate - wrong file size" [ $(calc_stats $OSC.*.${OSC}_stats lockless_truncate) -ne 0 ] || error "not cached truncate isn't lockless" @@ -891,7 +893,8 @@ test_32a() { # bug 11270 enable_lockless_truncate 0 clear_stats $OSC.*.${OSC}_stats $TRUNCATE $DIR2/$tfile 3000000 - $CHECKSTAT -s 3000000 $DIR1/$tfile || error "wrong file size" + $CHECKSTAT -s 3000000 $DIR1/$tfile || + error "lockless truncate disabled - wrong file size" [ $(calc_stats $OSC.*.${OSC}_stats lockless_truncate) -eq 0 ] || error "lockless truncate disabling failed" rm -f $DIR1/$tfile -- 1.8.3.1