[PATCH] fstests: generic/571: skip test if locktest -t on NFS returns EAGAIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As kernel commit e93a5e9306a5 ("NFSv4: Add support for
application leases underpinned by a delegation") describes,
NFS now supports file leases only after delegations.
However, fstests lacks many NFS functionalities including
delegation.

So let's skip generic/571 if locktest -t on NFS returns EAGAIN
because of commit df2c7b951f43 ("NFSv4: setlease should return EAGAIN
if locks are not available").

Signed-off-by: Su Yue <suy.fnst@xxxxxxxxxxx>
---
 common/rc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index c0fb11c6692f..5da12744242b 100644
--- a/common/rc
+++ b/common/rc
@@ -3967,7 +3967,10 @@ _require_test_fcntl_setlease()
 	_require_test_program "locktest"
 	touch $TEST_DIR/setlease_testfile
 	$here/src/locktest -t $TEST_DIR/setlease_testfile >/dev/null 2>&1
-	[ $? -eq 22 ] && _notrun "Require fcntl setlease support"
+	local ret=$?
+	[ $ret -eq 22 ] && _notrun "Require fcntl setlease support"
+	[ "$FSTYP" == "nfs" -a $ret -eq 11 ] && \
+		_notrun "NFS requires delegation before setlease"
 }
 
 _require_ofd_locks()
-- 
2.30.1





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux