]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test(NFS): remove a workaround for systemd v230
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Sun, 14 Aug 2022 05:30:06 +0000 (05:30 +0000)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 29 Sep 2022 05:25:42 +0000 (05:25 +0000)
Remove some more dead code.
Improve style and formatting.
Remove duplicated modules.

test/TEST-20-NFS/dhcpd.conf
test/TEST-20-NFS/hosts
test/TEST-20-NFS/test.sh

index 4ba730191b195920bff2d99c258017e7a554cd22..6b2ac439b8e11c6db9f5d8f836655b2c7bd78164 100644 (file)
@@ -14,12 +14,12 @@ option domain-name "other.com";
 # MAC numbering scheme:
 # NFSv3: last octect starts at 0x00 and works up
 
-    group {
-        # NFSv3 root=dhcp or root={/dev/,}nfs, use server-id
-        option root-path "/nfs/client";
+        group {
+                # NFSv3 root=dhcp or root={/dev/,}nfs, use server-id
+                option root-path "/nfs/client";
 
-        host nfs3-1 {
-            hardware ethernet 52:54:00:12:34:00;
+                host nfs3-1 {
+                        hardware ethernet 52:54:00:12:34:00;
                         fixed-address 192.168.50.101;
                 }
         }
index f8c18b6bb8adc1f13758a13d7a556fc7c4ad5d8a..36be908878ef3460cf79e14ff522849d50ac2523 100644 (file)
@@ -2,7 +2,4 @@
 192.168.50.1   server
 192.168.50.2   server-ip
 192.168.50.3   server-proto-ip
-192.168.50.100 workstation1
 192.168.50.101 workstation2
-192.168.50.102 workstation3
-192.168.50.103 workstation4
index 990e54e5684449d618310b7764b4e56da39f5a3c..5409f2b333792638cfe17a8812ce659f004df979 100755 (executable)
@@ -138,16 +138,14 @@ test_nfsv3() {
     client_test "NFSv3 root=dhcp DHCP path only" 52:54:00:12:34:00 \
         "root=dhcp" 192.168.50.1 -wsize=4096 || return 1
 
-    if [[ "$(systemctl --version)" != *"systemd 230"* ]] 2> /dev/null; then
-        client_test "NFSv3 Legacy root=/dev/nfs nfsroot=IP:path" 52:54:00:12:34:01 \
-            "root=/dev/nfs nfsroot=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1
+    client_test "NFSv3 Legacy root=/dev/nfs nfsroot=IP:path" 52:54:00:12:34:01 \
+        "root=/dev/nfs nfsroot=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1
 
-        client_test "NFSv3 Legacy root=/dev/nfs DHCP path only" 52:54:00:12:34:00 \
-            "root=/dev/nfs" 192.168.50.1 -wsize=4096 || return 1
+    client_test "NFSv3 Legacy root=/dev/nfs DHCP path only" 52:54:00:12:34:00 \
+        "root=/dev/nfs" 192.168.50.1 -wsize=4096 || return 1
 
-        client_test "NFSv3 Legacy root=/dev/nfs DHCP IP:path" 52:54:00:12:34:01 \
-            "root=/dev/nfs" 192.168.50.2 -wsize=4096 || return 1
-    fi
+    client_test "NFSv3 Legacy root=/dev/nfs DHCP IP:path" 52:54:00:12:34:01 \
+        "root=/dev/nfs" 192.168.50.2 -wsize=4096 || return 1
 
     client_test "NFSv3 root=dhcp DHCP IP:path" 52:54:00:12:34:01 \
         "root=dhcp" 192.168.50.2 -wsize=4096 || return 1
@@ -169,19 +167,19 @@ test_nfsv3() {
 
     # This test must fail: nfsroot= requires root=/dev/nfs
     client_test "NFSv3 Invalid root=dhcp nfsroot=/nfs/client" 52:54:00:12:34:04 \
-        "root=dhcp nfsroot=/nfs/client failme rd.debug" 192.168.50.1 -wsize=4096 && return 1
+        "root=dhcp nfsroot=/nfs/client failme" 192.168.50.1 -wsize=4096 && return 1
 
-    client_test "NFSv3 root=dhcp 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 path,options" 52:54:00:12:34:05 \
+        "root=dhcp" 192.168.50.1 wsize=4096 || return 1
 
-    client_test "NFSv3 Bridge Customized root=dhcp DHCP path,options" \
-        52:54:00:12:34:05 "root=dhcp bridge=foobr0:enp0s1" 192.168.50.1 wsize=4096 || return 1
+    client_test "NFSv3 Bridge Customized root=dhcp DHCP path,options" 52:54:00:12:34:05 \
+        "root=dhcp bridge=foobr0:enp0s1" 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 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
+    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
 
     return 0
 }
@@ -198,11 +196,10 @@ test_nfsv4() {
         "root=dhcp" 192.168.50.3 wsize=4096 || return 1
 
     client_test "NFSv4 root=nfs4:..." 52:54:00:12:34:84 \
-        "root=nfs4:192.168.50.1:/client" 192.168.50.1 \
-        -wsize=4096 || return 1
+        "root=nfs4:192.168.50.1:/client" 192.168.50.1 -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
+    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
 
     return 0
 }