]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
NFS test: add test cases for DHCP/nfsroot=[IP:]/path[,options]
authorDavid Dillow <dave@thedillows.org>
Sun, 7 Jun 2009 19:01:31 +0000 (15:01 -0400)
committerDavid Dillow <dave@thedillows.org>
Sun, 7 Jun 2009 19:01:31 +0000 (15:01 -0400)
test/TEST-20-NFS/dhcpd.conf
test/TEST-20-NFS/test.sh

index 3c6f17d35da508ba29c67da74f435fff8d4fffd9..a4f7fc18cd971364feb0f82fe93ef96bd20cbce6 100644 (file)
@@ -54,6 +54,45 @@ subnet 192.168.50.0 netmask 255.255.255.0 {
                }
        }
 
+       group {
+               # NFSv3 root=dhcp, nfsroot=/path and nfsroot=IP:/path testing
+
+               host nfs3-5 {
+                       hardware ethernet 52:54:00:12:34:04;
+                       fixed-address 192.168.50.101;
+               }
+       }
+
+       group {
+               # NFSv3 root=dhcp, use path, comma-separated options
+               option root-path "/nfs/client,wsize=4096";
+
+               host nfs3-6 {
+                       hardware ethernet 52:54:00:12:34:05;
+                       fixed-address 192.168.50.101;
+               }
+       }
+
+       group {
+               # NFSv3 root=dhcp, use IP, path, comma-separated options
+               option root-path "192.168.50.2:/nfs/client,wsize=4096";
+
+               host nfs3-7 {
+                       hardware ethernet 52:54:00:12:34:06;
+                       fixed-address 192.168.50.101;
+               }
+       }
+
+       group {
+               # NFSv3 root=dhcp, use proto, IP, path, comma-separated options
+               option root-path "nfs:192.168.50.3:/nfs/client,wsize=4096";
+
+               host nfs3-8 {
+                       hardware ethernet 52:54:00:12:34:07;
+                       fixed-address 192.168.50.101;
+               }
+       }
+
        # MAC numbering scheme:
        # NFSv4: last octect starts at 0x80 and works up
 
@@ -96,4 +135,43 @@ subnet 192.168.50.0 netmask 255.255.255.0 {
                        fixed-address 192.168.50.101;
                }
        }
+
+       group {
+               # NFSv3 root=nfs4, nfsroot=/path and nfsroot=IP:/path testing
+               host nfs4-5 {
+                       hardware ethernet 52:54:00:12:34:84;
+                       fixed-address 192.168.50.101;
+               }
+       }
+
+       group {
+               # NFSv4 root={/dev/,}nfs4, use server-id, comma-separated opts
+               option root-path "/client,wsize=4096";
+
+               host nfs4-6 {
+                       hardware ethernet 52:54:00:12:34:85;
+                       fixed-address 192.168.50.101;
+               }
+       }
+
+       group {
+               # NFSv4 root={/dev/,}nfs4, use given IP, comma-separated opts
+               option root-path "192.168.50.2:/client,wsize=4096";
+
+               host nfs4-7 {
+                       hardware ethernet 52:54:00:12:34:86;
+                       fixed-address 192.168.50.101;
+               }
+       }
+
+       group {
+               # NFSv4 root=dhcp, use comma-separated opts
+               option root-path "nfs4:192.168.50.3:/client,wsize=4096";
+
+               host nfs4-8 {
+                       hardware ethernet 52:54:00:12:34:87;
+                       fixed-address 192.168.50.101;
+               }
+       }
+
 }
index 8adfdbb1a2cac17029c7b8e311d7fc788a6c77f6..5888fdc87269323a2d0c8ce93054929cabb081bd 100755 (executable)
@@ -130,6 +130,31 @@ test_run() {
     client_test "NFSv3 root=dhcp DHCP proto:IP:path:options" 52:54:00:12:34:03 \
        "root=dhcp" 192.168.50.3 wsize=4096 || return 1
 
+    client_test "NFSv3 nfsroot=/nfs/client" 52:54:00:12:34:04 \
+       "nfsroot=/nfs/client" 192.168.50.1 -wsize=4096 || return 1
+
+    client_test "NFSv3 nfsroot=192.168.50.2:/nfs/client" 52:54:00:12:34:04 \
+       "nfsroot=192.168.50.2:/nfs/client" 192.168.50.2 -wsize=4096 || return 1
+
+    client_test "NFSv3 root=dhcp nfsroot=/nfs/client" 52:54:00:12:34:04 \
+       "root=dhcp nfsroot=/nfs/client" 192.168.50.1 -wsize=4096 || return 1
+
+    client_test "NFSv3 root=nfs nfsroot=/nfs/client" 52:54:00:12:34:04 \
+       "root=nfs nfsroot=/nfs/client" 192.168.50.1 -wsize=4096 || return 1
+
+    client_test "NFSv3 root=nfs nfsroot=/nfs/client,wsize=4096" \
+       52:54:00:12:34:04 "root=nfs nfsroot=/nfs/client,wsize=4096" \
+       192.168.50.1 wsize=4096 || return 1
+
+    client_test "NFSv3 root=nfs DHCP path,options" \
+       52:54:00:12:34:05 "root=dhcp" 192.168.50.1 wsize=4096 || return 1
+
+    client_test "NFSv3 root=dhcp DHCP IP:path,options" \
+       52:54:00:12:34:06 "root=dhcp" 192.168.50.2 wsize=4096 || return 1
+
+    client_test "NFSv3 root=dhcp DHCP proto:IP:path,options" \
+       52:54:00:12:34:07 "root=dhcp" 192.168.50.3 wsize=4096 || return 1
+
     # There is a mandatory 90 second recovery when starting the NFSv4
     # server, so put these later in the list to avoid a pause when doing
     # switch_root
@@ -151,6 +176,26 @@ test_run() {
 
     client_test "NFSv4 root=dhcp DHCP proto:IP:path:options" 52:54:00:12:34:83 \
        "root=dhcp" 192.168.50.3 wsize=4096 || return 1
+
+    client_test "NFSv4 root=nfs4 nfsroot=/client" 52:54:00:12:34:84 \
+       "root=nfs4 nfsroot=/client" 192.168.50.1 -wsize=4096 || return 1
+
+    client_test "NFSv4 root=nfs4 nfsroot=192.168.50.2:/client" \
+       52:54:00:12:34:84 "root=nfs4 nfsroot=192.168.50.2:/client" \
+       192.168.50.2 -wsize=4096 || return 1
+
+    client_test "NFSv4 root=nfs4 nfsroot=path,opts" \
+       52:54:00:12:34:84 "root=nfs4 nfsroot=/client,wsize=4096" \
+       192.168.50.1 wsize=4096 || return 1
+
+    client_test "NFSv4 root=nfs4 DHCP path,options" \
+       52:54:00:12:34:85 "root=nfs4" 192.168.50.1 wsize=4096 || return 1
+
+    client_test "NFSv4 root=nfs4 DHCP IP:path,options" \
+       52:54:00:12:34:86 "root=nfs4" 192.168.50.2 wsize=4096 || return 1
+
+    client_test "NFSv4 root=dhcp DHCP proto:IP:path,options" \
+       52:54:00:12:34:87 "root=dhcp" 192.168.50.3 wsize=4096 || return 1
 }
 
 test_setup() {