NFS test: separate NFSv3 and NFSv4 tests into their own functions

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.
master
David Dillow 2009-06-07 15:48:07 -04:00
parent 0000e1816c
commit 6b6805b8af
1 changed files with 13 additions and 6 deletions

View File

@ -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