Skip to content

nfs4.1: add some directory delegation testcases

Jeff Layton linux-nfs 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20250930-dir-deleg-4ae7364fb398

Versions newest first

  1. v3 Latest26 patches 1 replyIn review
  2. v225 patches 2 repliesSuperseded inferred link
  3. v17 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Ensure we clean up state after tests
- Demote some extra-chatty messages to debug level
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26nfs4.1: add proposed NOTIFY4_GFLAG_EXTEND flagnfs4.1/xdrdef/nfs4.x+2 -10 replies
2/26nfs4.1: add a getfh() to the end of create_obj() compoundnfs4.1/server41tests/environment.py+1 -10 replies
3/26server41tests: add a basic GET_DIR_DELEGATION testnfs4.1/nfs4client.py nfs4.1/server41tests/__init__.py nfs4.1/server41tests/st_dir_deleg.py+116 -00 replies
4/26server41tests: add a test for duplicate GET_DIR_DELEGATION requestsnfs4.1/server41tests/st_dir_deleg.py+26 -00 replies
5/26server41tests: pass_warn() when server doesn't support dir delegationsnfs4.1/server41tests/st_dir_deleg.py+18 -30 replies
6/26server41tests: test remove triggers dir delegation recallnfs4.1/server41tests/st_dir_deleg.py+35 -10 replies
7/26server41tests: test rename triggers dir delegation recallnfs4.1/server41tests/st_dir_deleg.py+37 -00 replies
8/26server41tests: test mkdir triggers dir delegation recallnfs4.1/server41tests/st_dir_deleg.py+23 -00 replies
9/26server41tests: test link triggers dir delegation recallnfs4.1/server41tests/st_dir_deleg.py+36 -00 replies
10/26server41tests: test no notifications without GFLAG_EXTENDnfs4.1/server41tests/st_dir_deleg.py+37 -00 replies
11/26server41tests: test unrequested notification type triggers recallnfs4.1/server41tests/st_dir_deleg.py+39 -00 replies
12/26server41tests: add a test for removal from dir with dir delegationnfs4.1/server41tests/st_dir_deleg.py+63 -20 replies
13/26server41tests: add a test for directory add notificationsnfs4.1/server41tests/st_dir_deleg.py+45 -00 replies
14/26server41tests: add test for RENAME event notificationsnfs4.1/server41tests/st_dir_deleg.py+47 -00 replies
15/26server41tests: verify child attributes in ADD notificationnfs4.1/server41tests/st_dir_deleg.py+51 -00 replies
16/26server41tests: test CHANGE_DIR_ATTRS notificationnfs4.1/server41tests/st_dir_deleg.py+54 -00 replies
17/26server41tests: test mkdir triggers ADD notificationnfs4.1/server41tests/st_dir_deleg.py+33 -00 replies
18/26server41tests: test DELEGRETURN stops notificationsnfs4.1/server41tests/st_dir_deleg.py+42 -00 replies
19/26server41tests: verify filehandle in ADD notificationnfs4.1/server41tests/st_dir_deleg.py+51 -00 replies
20/26server41tests: test cross-directory rename REMOVE notificationnfs4.1/server41tests/st_dir_deleg.py+57 -00 replies
21/26server41tests: test cross-directory rename ADD notification on targetnfs4.1/server41tests/st_dir_deleg.py+60 -00 replies
22/26server41tests: test link triggers ADD notificationnfs4.1/server41tests/st_dir_deleg.py+56 -00 replies
23/26server41tests: test same-client changes don't trigger notificationsnfs4.1/server41tests/st_dir_deleg.py+41 -00 replies
24/26server41tests: test cross-directory rename-over nad_old_entrynfs4.1/server41tests/st_dir_deleg.py+99 -10 replies
25/26server41tests: test within-directory rename-over nad_old_entrynfs4.1/server41tests/st_dir_deleg.py+65 -00 replies
26/26nfs4.1: move a lot of log/log_cb.info messages to log/log_cb.debugnfs4.1/nfs4client.py nfs4.1/server41tests/environment.py nfs4.1/server41tests/st_delegation.py+21 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH pynfs v3 00/26] nfs4.1: add some directory delegation testcases

Long delay since v2, but the CB_NOTIFY patches only recently got merged into Chuck's nfsd-testing branch. They're currently slated to make v7.3. This version of the series fixes some potential state leaks that Scott pointed out, and adds a patch to make the output a bit less chatty with normal settings.

Original cover letter follows:

---------------------8<-------------------

This patchset adds some new testcases for directory delegations.

DIRDELEG1-7 should pass on current mainline kernels, with recall-only support. The rest require CB_NOTIFY support. If the server doesn't offer notifications, then the tests pass_warn (so there should be no failures in those cases):

    https://lore.kernel.org/linux-nfs/[email protected]/

---
Changes in v3:
- Ensure we clean up state after tests
- Demote some extra-chatty messages to debug level
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Added more tests for CB_NOTIFY behavior
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Jeff Layton (26):
nfs4.1: add proposed NOTIFY4_GFLAG_EXTEND flag
nfs4.1: add a getfh() to the end of create_obj() compound
server41tests: add a basic GET_DIR_DELEGATION test
server41tests: add a test for duplicate GET_DIR_DELEGATION requests
server41tests: pass_warn() when server doesn't support dir delegations
server41tests: test remove triggers dir delegation recall
server41tests: test rename triggers dir delegation recall
server41tests: test mkdir triggers dir delegation recall
server41tests: test link triggers dir delegation recall
server41tests: test no notifications without GFLAG_EXTEND
server41tests: test unrequested notification type triggers recall
server41tests: add a test for removal from dir with dir delegation
server41tests: add a test for directory add notifications
server41tests: add test for RENAME event notifications
server41tests: verify child attributes in ADD notification
server41tests: test CHANGE_DIR_ATTRS notification
server41tests: test mkdir triggers ADD notification
server41tests: test DELEGRETURN stops notifications
server41tests: verify filehandle in ADD notification
server41tests: test cross-directory rename REMOVE notification
server41tests: test cross-directory rename ADD notification on target
server41tests: test link triggers ADD notification
server41tests: test same-client changes don't trigger notifications
server41tests: test cross-directory rename-over nad_old_entry
server41tests: test within-directory rename-over nad_old_entry nfs4.1: move a lot of log/log_cb.info messages to log/log_cb.debug

 nfs4.1/nfs4client.py                  |   42 +-
 nfs4.1/server41tests/__init__.py      |    1 +
 nfs4.1/server41tests/environment.py   |    6 +-
 nfs4.1/server41tests/st_delegation.py |    3 -
 nfs4.1/server41tests/st_dir_deleg.py  | 1117 +++++++++++++++++++++++++++++++++
 nfs4.1/xdrdef/nfs4.x                  |    3 +-
 6 files changed, 1147 insertions(+), 25 deletions(-)

---
base-commit: cd4701827a8261fedbfb4c6e39029fb9671321a6
change-id: 20260331-dir-deleg-a1b3475f8385

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>