Browse Source

NFS test: add test cases for DHCP/nfsroot=[IP:]/path[,options]

master
David Dillow 16 years ago
parent
commit
0000e1816c
  1. 78
      test/TEST-20-NFS/dhcpd.conf
  2. 45
      test/TEST-20-NFS/test.sh

78
test/TEST-20-NFS/dhcpd.conf

@ -54,6 +54,45 @@ subnet 192.168.50.0 netmask 255.255.255.0 { @@ -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 { @@ -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;
}
}

}

45
test/TEST-20-NFS/test.sh

@ -130,6 +130,31 @@ test_run() { @@ -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() { @@ -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() {

Loading…
Cancel
Save