Skip to contentSkip to conversation

pynfs: add CB_GETATTR tests

PATCH Superseded Jeff Layton 1 participant 3 messages Sep 5, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jeff Layton

author maintainer
#0 lore raw

cover pynfs: add CB_GETATTR tests

Just a patch to add a couple of tests for CB_GETATTR support, and another to update the CONTRIBUTING document. I've also taken a stab at adding support for the delstid draft to pynfs, but I'm having trouble getting the xdr changes to build properly. I'll send a separate email about that.

---
Jeff Layton (2):
pynfs: update maintainer info
nfs4.1: add two CB_GETATTR tests

 CONTRIBUTING                          |  6 +--
 nfs4.1/nfs4client.py                  |  6 +++
 nfs4.1/server41tests/st_delegation.py | 72 ++++++++++++++++++++++++++++++++++-
 3 files changed, 80 insertions(+), 4 deletions(-)

---
base-commit: 08ffc1747800760c57f8db4eb02e62ece267591f
change-id: 20240905-cb_getattr-8db184a5b4bf

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>
author maintainer
#1 lore raw

PATCH 1/2 pynfs: update maintainer info

Calum is the new maintainer. Update the CONTRIBUTING doc.

---
 CONTRIBUTING | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
CONTRIBUTING +3 -3
index 220b3e0629aa..d15b2b827879 100644
@@ -1,15 +1,15 @@
 Check out the latest source code from
 
-	git://git.linux-nfs.org/projects/bfields/pynfs.git
+	git://git.linux-nfs.org/projects/cdmackay/pynfs.git
 
 Commit your changes.  Please make sure each commit is individually
 correct and does only one thing.
 
-When you're done, send the resulting patches to [email protected] and
+When you're done, send the resulting patches to [email protected] and
 cc the [email protected] mailing list, using something like:
 
 	git format-patch origin..
-	git send-email --to="[email protected]" \
+	git send-email --to="[email protected]" \
 			--cc="[email protected] 0*
 
 We generally follow similar processes to the Linux kernel, so
Signature · 1 line
2.46.0
author maintainer
#2 lore raw

PATCH 2/2 nfs4.1: add two CB_GETATTR tests

In reply to Jeff Layton

Add tests for CB_GETATTR support.

Open a file r/w and request a write delegation. Do a getattr against it to get the current size and change attr. From a second client, issue a GETATTR against the file.

One test does this and has the delegation holder send back the same attrs, another has it send back updated ones.

---
 nfs4.1/nfs4client.py                  |  6 +++
 nfs4.1/server41tests/st_delegation.py | 72 ++++++++++++++++++++++++++++++++++-
 2 files changed, 77 insertions(+), 1 deletion(-)
nfs4.1/nfs4client.py +6 -0
index 8ce64dd639c7..941cf4000a5f 100644
@@ -271,6 +271,12 @@ class NFS4Client(rpc.Client, rpc.Server):
         res = self.posthook(arg, env, res)
         return encode_status(NFS4_OK, res)
 
+    def op_cb_getattr(self, arg, env):
+        log_cb.info("In CB_GETATTR")
+        self.prehook(arg, env)
+        res = self.posthook(arg, env, res=CB_GETATTR4resok())
+        return encode_status(NFS4_OK, res)
+
     def op_cb_recall(self, arg, env):
         log_cb.info("In CB_RECALL")
         self.prehook(arg, env)
nfs4.1/server41tests/st_delegation.py +71 -1

81 lines not on this page · raw message

Signature · 1 line
2.46.0