kola/tests/misc: Unify the NFSv4 test across distros
Container Linux previously defaulted to NFSv3, resulting in the
specified path not being relative to the export root.
@@ -55,13 +55,6 @@ func init() {
Run: NFSv4,
ClusterSize: 0,
Name: "linux.nfs.v4",
- Distros: []string{"cl"},
- })
- register.Register(&register.Test{
- Run: RHCOSNFSv4,
- ClusterSize: 0,
- Name: "rhcos.linux.nfs.v4",
- Distros: []string{"rhcos"},
})
}
@@ -80,6 +73,11 @@ func testNFS(c cluster.TestCluster, nfsversion int, remotePath string) {
c.Logf("Test file %q created on server.", tmp)
+ nfstype := "nfs"
+ if nfsversion == 4 {
+ nfstype = "nfs4"
+ }
+
c2 := conf.ContainerLinuxConfig(fmt.Sprintf(`storage:
files:
- filesystem: "root"
@@ -102,11 +100,11 @@ systemd:
[Mount]
What=%s:%s
Where=/var/mnt
- Type=nfs
+ Type=%s
Options=defaults,noexec,nfsvers=%d
[Install]
- WantedBy=multi-user.target`, m1.PrivateIP(), remotePath, nfsversion))
+ WantedBy=multi-user.target`, m1.PrivateIP(), remotePath, nfstype, nfsversion))
m2, err := c.NewMachine(c2)
if err != nil {
@@ -139,12 +137,7 @@ func NFSv3(c cluster.TestCluster) {
testNFS(c, 3, "/tmp")
}
-// Test that NFSv4 without security works on CoreOS.
+// Test that NFSv4 without security works.
func NFSv4(c cluster.TestCluster) {
- testNFS(c, 4, "/tmp")
-}
-
-// Test that NFSv4 without security works on RHCOS.
-func RHCOSNFSv4(c cluster.TestCluster) {
testNFS(c, 4, "/")
}
