From 892c2251d854f480c272ab2999cdc6f4c87fecf0 Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 5 Jun 2019 02:28:24 -0400 Subject: [PATCH 1/1] LU-11623 tests: Fix sanity 27E to ensure getattr RPC While cat does perform fstat() on the file it opens, I guess it's not guaranteed. More importantly, we really need to ensure the locks that the file has after creation are dropped before we issue our stat() to ensure the RPC is actually made, since it's this GETATTR RPC that is ensuring easize update from MDT response. Change-Id: Ic86229ac514e1385c665c6c0d9f6eef13d9748f5 Signed-off-by: Oleg Drokin Test-Parameters: trivial Reviewed-on: https://review.whamcloud.com/35067 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Patrick Farrell Reviewed-by: James Nunez Reviewed-by: Andreas Dilger --- lustre/tests/sanity.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 401803d..2d6bcdd 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -2530,8 +2530,12 @@ test_27E() { $LFS setstripe -c $OSTCOUNT $DIR/$tfile || error "setstripe failed" - cat $DIR/$tfile - rm $DIR/$tfile + # In order to ensure stat() call actually talks to MDS we need to + # do something drastic to this file to shake off all lock, e.g. + # rename it (kills lookup lock forcing cache cleaning) + mv $DIR/$tfile $DIR/${tfile}-1 + ls -l $DIR/${tfile}-1 + rm $DIR/${tfile}-1 easize=$($LCTL get_param -n llite.*.default_easize) -- 1.8.3.1