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 <jnunez@whamcloud.com>
Change-Id: I71aae8de67125d5be93c4fb4728b2c20d26df49c
Reviewed-on: https://review.whamcloud.com/40496
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Vikentsi Lapa <vlapa@whamcloud.com>
log "checking cached lockless truncate"
$TRUNCATE $DIR1/$tfile 8000000
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
[ $(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"
[ $(calc_stats $OSC.*.${OSC}_stats lockless_truncate) -ne 0 ] ||
error "not cached truncate isn't lockless"
enable_lockless_truncate 0
clear_stats $OSC.*.${OSC}_stats
$TRUNCATE $DIR2/$tfile 3000000
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
[ $(calc_stats $OSC.*.${OSC}_stats lockless_truncate) -eq 0 ] ||
error "lockless truncate disabling failed"
rm -f $DIR1/$tfile