Skip to content

Commit d091014

Browse files
LaszloGombosjohannbg
authored andcommitted
test(NFS): remove a workaround for systemd v230
Remove some more dead code. Improve style and formatting. Remove duplicated modules.
1 parent 0da80a1 commit d091014

File tree

3 files changed

+23
-29
lines changed

3 files changed

+23
-29
lines changed

test/TEST-20-NFS/dhcpd.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ option domain-name "other.com";
1414
# MAC numbering scheme:
1515
# NFSv3: last octect starts at 0x00 and works up
1616

17-
group {
18-
# NFSv3 root=dhcp or root={/dev/,}nfs, use server-id
19-
option root-path "/nfs/client";
17+
group {
18+
# NFSv3 root=dhcp or root={/dev/,}nfs, use server-id
19+
option root-path "/nfs/client";
2020

21-
host nfs3-1 {
22-
hardware ethernet 52:54:00:12:34:00;
21+
host nfs3-1 {
22+
hardware ethernet 52:54:00:12:34:00;
2323
fixed-address 192.168.50.101;
2424
}
2525
}

test/TEST-20-NFS/hosts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22
192.168.50.1 server
33
192.168.50.2 server-ip
44
192.168.50.3 server-proto-ip
5-
192.168.50.100 workstation1
65
192.168.50.101 workstation2
7-
192.168.50.102 workstation3
8-
192.168.50.103 workstation4

test/TEST-20-NFS/test.sh

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,14 @@ test_nfsv3() {
138138
client_test "NFSv3 root=dhcp DHCP path only" 52:54:00:12:34:00 \
139139
"root=dhcp" 192.168.50.1 -wsize=4096 || return 1
140140

141-
if [[ "$(systemctl --version)" != *"systemd 230"* ]] 2> /dev/null; then
142-
client_test "NFSv3 Legacy root=/dev/nfs nfsroot=IP:path" 52:54:00:12:34:01 \
143-
"root=/dev/nfs nfsroot=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1
141+
client_test "NFSv3 Legacy root=/dev/nfs nfsroot=IP:path" 52:54:00:12:34:01 \
142+
"root=/dev/nfs nfsroot=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1
144143

145-
client_test "NFSv3 Legacy root=/dev/nfs DHCP path only" 52:54:00:12:34:00 \
146-
"root=/dev/nfs" 192.168.50.1 -wsize=4096 || return 1
144+
client_test "NFSv3 Legacy root=/dev/nfs DHCP path only" 52:54:00:12:34:00 \
145+
"root=/dev/nfs" 192.168.50.1 -wsize=4096 || return 1
147146

148-
client_test "NFSv3 Legacy root=/dev/nfs DHCP IP:path" 52:54:00:12:34:01 \
149-
"root=/dev/nfs" 192.168.50.2 -wsize=4096 || return 1
150-
fi
147+
client_test "NFSv3 Legacy root=/dev/nfs DHCP IP:path" 52:54:00:12:34:01 \
148+
"root=/dev/nfs" 192.168.50.2 -wsize=4096 || return 1
151149

152150
client_test "NFSv3 root=dhcp DHCP IP:path" 52:54:00:12:34:01 \
153151
"root=dhcp" 192.168.50.2 -wsize=4096 || return 1
@@ -169,19 +167,19 @@ test_nfsv3() {
169167

170168
# This test must fail: nfsroot= requires root=/dev/nfs
171169
client_test "NFSv3 Invalid root=dhcp nfsroot=/nfs/client" 52:54:00:12:34:04 \
172-
"root=dhcp nfsroot=/nfs/client failme rd.debug" 192.168.50.1 -wsize=4096 && return 1
170+
"root=dhcp nfsroot=/nfs/client failme" 192.168.50.1 -wsize=4096 && return 1
173171

174-
client_test "NFSv3 root=dhcp DHCP path,options" \
175-
52:54:00:12:34:05 "root=dhcp" 192.168.50.1 wsize=4096 || return 1
172+
client_test "NFSv3 root=dhcp DHCP path,options" 52:54:00:12:34:05 \
173+
"root=dhcp" 192.168.50.1 wsize=4096 || return 1
176174

177-
client_test "NFSv3 Bridge Customized root=dhcp DHCP path,options" \
178-
52:54:00:12:34:05 "root=dhcp bridge=foobr0:enp0s1" 192.168.50.1 wsize=4096 || return 1
175+
client_test "NFSv3 Bridge Customized root=dhcp DHCP path,options" 52:54:00:12:34:05 \
176+
"root=dhcp bridge=foobr0:enp0s1" 192.168.50.1 wsize=4096 || return 1
179177

180-
client_test "NFSv3 root=dhcp DHCP IP:path,options" \
181-
52:54:00:12:34:06 "root=dhcp" 192.168.50.2 wsize=4096 || return 1
178+
client_test "NFSv3 root=dhcp DHCP IP:path,options" 52:54:00:12:34:06 \
179+
"root=dhcp" 192.168.50.2 wsize=4096 || return 1
182180

183-
client_test "NFSv3 root=dhcp DHCP proto:IP:path,options" \
184-
52:54:00:12:34:07 "root=dhcp" 192.168.50.3 wsize=4096 || return 1
181+
client_test "NFSv3 root=dhcp DHCP proto:IP:path,options" 52:54:00:12:34:07 \
182+
"root=dhcp" 192.168.50.3 wsize=4096 || return 1
185183

186184
return 0
187185
}
@@ -198,11 +196,10 @@ test_nfsv4() {
198196
"root=dhcp" 192.168.50.3 wsize=4096 || return 1
199197

200198
client_test "NFSv4 root=nfs4:..." 52:54:00:12:34:84 \
201-
"root=nfs4:192.168.50.1:/client" 192.168.50.1 \
202-
-wsize=4096 || return 1
199+
"root=nfs4:192.168.50.1:/client" 192.168.50.1 -wsize=4096 || return 1
203200

204-
client_test "NFSv4 root=dhcp DHCP proto:IP:path,options" \
205-
52:54:00:12:34:87 "root=dhcp" 192.168.50.3 wsize=4096 || return 1
201+
client_test "NFSv4 root=dhcp DHCP proto:IP:path,options" 52:54:00:12:34:87 \
202+
"root=dhcp" 192.168.50.3 wsize=4096 || return 1
206203

207204
return 0
208205
}

0 commit comments

Comments
 (0)