]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
NFS test: separate NFSv3 and NFSv4 tests into their own functions
authorDavid Dillow <dave@thedillows.org>
Sun, 7 Jun 2009 19:48:07 +0000 (15:48 -0400)
committerDavid Dillow <dave@thedillows.org>
Sun, 7 Jun 2009 19:48:07 +0000 (15:48 -0400)
The full tests take over 6 minutes to run, and commenting out unneeded
ones is time consuming -- this change lets me comment out one line to
temporarily avoid an entire class of tests.

test/TEST-20-NFS/test.sh

index 5888fdc87269323a2d0c8ce93054929cabb081bd..4a997c46b2f8308147d01e85f4791f1d961addc7 100755 (executable)
@@ -96,12 +96,7 @@ client_test() {
     return 0
 }
 
-test_run() {
-    if ! run_server; then
-       echo "Failed to start server" 1>&2
-       return 1
-    fi
-
+test_nfsv3() {
     # MAC numbering scheme:
     # NFSv3: last octect starts at 0x00 and works up
     # NFSv4: last octect starts at 0x80 and works up
@@ -154,7 +149,9 @@ test_run() {
 
     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
+}
 
+test_nfsv4() {
     # 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
@@ -198,6 +195,16 @@ test_run() {
        52:54:00:12:34:87 "root=dhcp" 192.168.50.3 wsize=4096 || return 1
 }
 
+test_run() {
+    if ! run_server; then
+       echo "Failed to start server" 1>&2
+       return 1
+    fi
+
+    test_nfsv3 || return 1
+    test_nfsv4
+}
+
 test_setup() {
     # Make server root
     dd if=/dev/zero of=server.ext2 bs=1M count=30