Skip to contentSkip to conversation

nfstest: add the delegation test group

PATCH In review Scott Mayhew 2 participants 2 messages May 10, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfstest: add the delegation test group

nfstest_delegation can use a second mount with a different nfs version to trigger delegation recalls (i.e. it doesn't need to use a second client), so it can be added to the nfstest workflow easily.

Note that the delegation test does show quite a few failures. For example, on a recent-ish Fedora kernel:

$ grep -Eh "^[0-9]+ tests" nfstest_delegation_20240510_152*.log
689 tests (623 passed, 66 failed)
1329 tests (1287 passed, 42 failed)
1329 tests (1287 passed, 42 failed)
---
 playbooks/roles/nfstest/templates/delegation.sh.j2 | 13 +++++++++++++
 workflows/nfstest/Kconfig                          |  6 ++++++
 workflows/nfstest/Makefile                         |  3 +++
 3 files changed, 22 insertions(+)
 create mode 100755 playbooks/roles/nfstest/templates/delegation.sh.j2
playbooks/roles/nfstest/templates/delegation.sh.j2 new file +13 -0
new file mode 100755
index 0000000..ede24d4
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+export PYTHONPATH="{{ nfstest_install_dir }}"
+cd {{ nfstest_install_dir }}/test/
+
+for vers in 4.0 4.1 4.2
+do
+  ./nfstest_delegation --runtest=all --createlog --nfsversion=${vers} \
+	--server={{ nfstest_nfs_server_host }} \
+	--export=/export/{{ nfstest_nfs_server_export }}
+done
+
+exit 0
workflows/nfstest/Kconfig +6 -0
index a029a56..e2f57aa 100644
@@ -54,6 +54,12 @@ config NFSTEST_TEST_GROUP_ALLOC
 	help
 	  Provision a target node to test NFSv4.2 space reservation.
 
+config NFSTEST_TEST_GROUP_DELEGATION
+	bool "Enable the nfstest_delegation testing section"
+	default n
+	help
+	  Provision target nodes to test NFS delegations.
+
 config NFSTEST_TEST_GROUP_DIO
 	bool "Enable the nfstest_dio testing section"
 	default n
workflows/nfstest/Makefile +3 -0
index 638ec1f..8a92496 100644
@@ -23,6 +23,9 @@ NFSTEST_ARGS += nfstest_repo_commit=$(NFSTEST_REPO_COMMIT)
 ifeq (y,$(CONFIG_NFSTEST_TEST_GROUP_ALLOC))
 NFSTEST_ENABLED_TEST_GROUPS += alloc
 endif
+ifeq (y,$(CONFIG_NFSTEST_TEST_GROUP_DELEGATION))
+NFSTEST_ENABLED_TEST_GROUPS += delegation
+endif
 ifeq (y,$(CONFIG_NFSTEST_TEST_GROUP_DIO))
 NFSTEST_ENABLED_TEST_GROUPS += dio
 endif
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Scott Mayhew

nfstest_delegation can use a second mount with a different nfs version to trigger delegation recalls (i.e. it doesn't need to use a second client), so it can be added to the nfstest workflow easily.

Note that the delegation test does show quite a few failures. For example, on a recent-ish Fedora kernel:

Quoted 6 lines
$ grep -Eh "^[0-9]+ tests" nfstest_delegation_20240510_152*.log
689 tests (623 passed, 66 failed)
1329 tests (1287 passed, 42 failed)
1329 tests (1287 passed, 42 failed)

Nice.

Quoted 61 lines
---
 playbooks/roles/nfstest/templates/delegation.sh.j2 | 13 +++++++++++++
 workflows/nfstest/Kconfig                          |  6 ++++++
 workflows/nfstest/Makefile                         |  3 +++
 3 files changed, 22 insertions(+)
 create mode 100755 playbooks/roles/nfstest/templates/delegation.sh.j2
playbooks/roles/nfstest/templates/delegation.sh.j2 new file +13 -0
new file mode 100755
index 0000000..ede24d4
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+export PYTHONPATH="{{ nfstest_install_dir }}"
+cd {{ nfstest_install_dir }}/test/
+
+for vers in 4.0 4.1 4.2
+do
+  ./nfstest_delegation --runtest=all --createlog --nfsversion=${vers} \
+	--server={{ nfstest_nfs_server_host }} \
+	--export=/export/{{ nfstest_nfs_server_export }}
+done
+
+exit 0
workflows/nfstest/Kconfig +6 -0
index a029a56..e2f57aa 100644
@@ -54,6 +54,12 @@ config NFSTEST_TEST_GROUP_ALLOC
 	help
 	  Provision a target node to test NFSv4.2 space reservation.
 
+config NFSTEST_TEST_GROUP_DELEGATION
+	bool "Enable the nfstest_delegation testing section"
+	default n
+	help
+	  Provision target nodes to test NFS delegations.
+
 config NFSTEST_TEST_GROUP_DIO
 	bool "Enable the nfstest_dio testing section"
 	default n
workflows/nfstest/Makefile +3 -0
index 638ec1f..8a92496 100644
@@ -23,6 +23,9 @@ NFSTEST_ARGS += nfstest_repo_commit=$(NFSTEST_REPO_COMMIT)
 ifeq (y,$(CONFIG_NFSTEST_TEST_GROUP_ALLOC))
 NFSTEST_ENABLED_TEST_GROUPS += alloc
 endif
+ifeq (y,$(CONFIG_NFSTEST_TEST_GROUP_DELEGATION))
+NFSTEST_ENABLED_TEST_GROUPS += delegation
+endif
 ifeq (y,$(CONFIG_NFSTEST_TEST_GROUP_DIO))
 NFSTEST_ENABLED_TEST_GROUPS += dio
 endif
Signature · 1 line
2.43.0
Signature · 1 line
Chuck Lever