From: Jeff Layton <jlayton@kernel.org>
To: Calum Mackay <calum.mackay@oracle.com>
Cc: Chuck Lever <chuck.lever@oracle.com>, NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Scott Mayhew <smayhew@redhat.com>,
linux-nfs@vger.kernel.org, Jeff Layton <jlayton@kernel.org>
Subject: [PATCH pynfs v3 04/26] server41tests: add a test for duplicate GET_DIR_DELEGATION requests
Date: Fri, 19 Jun 2026 15:22:23 -0400 [thread overview]
Message-ID: <20260619-dir-deleg-v3-4-1077ce8aab1b@kernel.org> (raw)
In-Reply-To: <20260619-dir-deleg-v3-0-1077ce8aab1b@kernel.org>
---
nfs4.1/server41tests/st_dir_deleg.py | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/nfs4.1/server41tests/st_dir_deleg.py b/nfs4.1/server41tests/st_dir_deleg.py
index 99768389cfa8..f47d1f6ac053 100644
--- a/nfs4.1/server41tests/st_dir_deleg.py
+++ b/nfs4.1/server41tests/st_dir_deleg.py
@@ -107,3 +107,29 @@ def testDirDelegSimple(t, env):
open_stateid = res.resarray[-2].stateid
file_fh = res.resarray[-1].object
close_file(sess2, file_fh, stateid=open_stateid)
+
+def testDirDelegDuplicate(t, env):
+ """Test that server returns GDD4_UNAVAIL on duplicate GDD4 request
+
+ FLAGS: dirdeleg all
+ CODE: DIRDELEG2
+ """
+ c = env.c1
+ recall = threading.Event()
+ sess1, fh, deleg = _getDirDeleg(t, env, [], recall)
+
+ # get a dir deleg with no notifications
+ ops = [ op.putfh(fh), op.get_dir_delegation(False,
+ nfs4lib.list2bitmap([]),
+ zerotime, zerotime,
+ nfs4lib.list2bitmap([]),
+ nfs4lib.list2bitmap([]))]
+ res = sess1.compound(ops)
+ check(res)
+ nfstatus = res.resarray[-1].gddr_res_non_fatal4.gddrnf_status
+ if (nfstatus != GDD4_UNAVAIL):
+ fail("Server replied to duplicate request with %d" % nfstatus)
+
+ ops = [ op.putfh(fh), op.delegreturn(deleg) ]
+ res = sess1.compound(ops)
+ check(res)
--
2.54.0
next prev parent reply other threads:[~2026-06-19 19:22 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 19:22 [PATCH pynfs v3 00/26] nfs4.1: add some directory delegation testcases Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 01/26] nfs4.1: add proposed NOTIFY4_GFLAG_EXTEND flag Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 02/26] nfs4.1: add a getfh() to the end of create_obj() compound Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 03/26] server41tests: add a basic GET_DIR_DELEGATION test Jeff Layton
2026-06-19 19:22 ` Jeff Layton [this message]
2026-06-19 19:22 ` [PATCH pynfs v3 05/26] server41tests: pass_warn() when server doesn't support dir delegations Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 06/26] server41tests: test remove triggers dir delegation recall Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 07/26] server41tests: test rename " Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 08/26] server41tests: test mkdir " Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 09/26] server41tests: test link " Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 10/26] server41tests: test no notifications without GFLAG_EXTEND Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 11/26] server41tests: test unrequested notification type triggers recall Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 12/26] server41tests: add a test for removal from dir with dir delegation Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 13/26] server41tests: add a test for directory add notifications Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 14/26] server41tests: add test for RENAME event notifications Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 15/26] server41tests: verify child attributes in ADD notification Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 16/26] server41tests: test CHANGE_DIR_ATTRS notification Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 17/26] server41tests: test mkdir triggers ADD notification Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 18/26] server41tests: test DELEGRETURN stops notifications Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 19/26] server41tests: verify filehandle in ADD notification Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 20/26] server41tests: test cross-directory rename REMOVE notification Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 21/26] server41tests: test cross-directory rename ADD notification on target Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 22/26] server41tests: test link triggers ADD notification Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 23/26] server41tests: test same-client changes don't trigger notifications Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 24/26] server41tests: test cross-directory rename-over nad_old_entry Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 25/26] server41tests: test within-directory " Jeff Layton
2026-06-19 19:22 ` [PATCH pynfs v3 26/26] nfs4.1: move a lot of log/log_cb.info messages to log/log_cb.debug Jeff Layton
2026-06-23 21:33 ` [PATCH pynfs v3 00/26] nfs4.1: add some directory delegation testcases Calum Mackay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260619-dir-deleg-v3-4-1077ce8aab1b@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=calum.mackay@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=smayhew@redhat.com \
--cc=tom@talpey.com \
--cc=trondmy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox