Package: src
Version: 5.0.2-1
Severity: normal
Tags: patch

The libnfs v3v4 autopkgtest currently tests NFSv4.0 behavior. In
particular, the NFSv4 part of the test uses the NFSv4.0 SETCLIENTID flow.

With nfs-utils 2.9.1, NFSv4.0 is disabled by default. Because of that, the
test can fail with NFS4ERR_MINOR_VERS_MISMATCH unless NFSv4.0 is explicitly
enabled in the test setup.

The attached patch updates debian/tests/v3v4 to enable NFSv4.0 before
starting nfs-kernel-server, so the test setup matches what the test is
trying to exercise.
diff --git a/debian/tests/v3v4 b/debian/tests/v3v4
index 8626e69..b772e11 100755
--- a/debian/tests/v3v4
+++ b/debian/tests/v3v4
@@ -4,6 +4,14 @@ set -e
 
 # decrease grace time from the default 90 secs to avoid NFS4ERR_GRACE errors
 sudo service nfs-kernel-server stop
+
+sudo mkdir -p /etc/nfs.conf.d
+cat <<EOF | sudo tee /etc/nfs.conf.d/autopkgtest.conf
+[nfsd]
+vers4=y
+vers4.0=y
+EOF
+
 echo 10 | sudo tee /proc/fs/nfsd/nfsv4leasetime
 echo 10 | sudo tee /proc/fs/nfsd/nfsv4gracetime
 sudo service nfs-kernel-server start

Reply via email to