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