[PATCH 3/5] pynfs: remove erroneous test from DELEG24 and DELEG25

Scott Mayhew
2026-04-03T13:27:47Z

fattr4_time_deleg_modify is valid in CB_GETATTR and SETATTR. attrs2
contains the attributes from a GETATTR reply, and will never contain the
fattr4_time_deleg_modify attribute.

Cc: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
Jeff - not sure what you want to do here. We can compare the the
FATTR4_TIME_DELEG_MODIFY that we sent to the server with the
FATTR4_TIME_MODIFY in attrs1 and/or attrs2, we just need to return
it (or the whole cbattrs dictionary) from _testCbGetattr().

nfs4.1/server41tests/st_delegation.py | 6 ------
1 file changed, 6 deletions(-)

diff --git a/nfs4.1/server41tests/st_delegation.py b/nfs4.1/server41tests/st_delegation.py
index 934e558..6ed1f5d 100644
--- a/nfs4.1/server41tests/st_delegation.py
+++ b/nfs4.1/server41tests/st_delegation.py
@@ -400,9 +400,6 @@ def testCbGetattrNoChange(t, env):
fail("Bad size: %u != %u" % (attrs1[FATTR4_SIZE], attrs2[FATTR4_SIZE]))
if attrs1[FATTR4_CHANGE] != attrs2[FATTR4_CHANGE]:
fail("Bad change attribute: %u != %u" % (attrs1[FATTR4_CHANGE], attrs2[FATTR4_CHANGE]))
- if FATTR4_TIME_DELEG_MODIFY in attrs2:
- if attrs1[FATTR4_TIME_MODIFY] != attrs2[FATTR4_TIME_DELEG_MODIFY]:
- fail("Bad modify time: ", attrs1[FATTR4_TIME_MODIFY], " != ", attrs2[FATTR4_TIME_DELEG_MODIFY])

def testCbGetattrWithChange(t, env):
"""Test CB_GETATTR with simulated changes to file
@@ -419,9 +416,6 @@ def testCbGetattrWithChange(t, env):
fail("Bad size: %u != 5" % attrs2[FATTR4_SIZE])
if attrs1[FATTR4_CHANGE] == attrs2[FATTR4_CHANGE]:
fail("Bad change attribute: %u == %u" % (attrs1[FATTR4_CHANGE], attrs2[FATTR4_CHANGE]))
- if FATTR4_TIME_DELEG_MODIFY in attrs2:
- if attrs1[FATTR4_TIME_MODIFY] == attrs2[FATTR4_TIME_DELEG_MODIFY]:
- fail("Bad modify time: ", attrs1[FATTR4_TIME_MODIFY], " == ", attrs2[FATTR4_TIME_DELEG_MODIFY])

def testDelegReadAfterClose(t, env):
"""Test read with delegation stateid after close
--
2.53.0