NFSv4 Test Suite

Introduction

 The NFSv4 test suite (nfsv4) is one of the test suites used to functionally test the NFSv4.0 protocol during and after the project development in Solaris 10. This test suite is independent from other Solaris test harnesses. Users can easily build and execute the tests (or a subset of the tests), and generate summary results using the suite source tarball from the download center.

 The source tarball also includes the nfsv4shell, the TCL tool that can be used to generate different NFSv4.0 compound operations to test against the NFSv4.0 server, which we found it as very useful for the negative testing and to verify that the client has correct behavior for the server's responses.

The HowTo's

 To start, download the nfsv4 source tarball to a directory in an OpenSolaris system and unzip it. For example, assuming the downloaded file is at /export:

cd /export
bzcat stcnv-nfsv4-src-YYYYMMDD.tar.bz2 | tar -xvf - 

 Then use the /usr/sfw/bin/gcc compiler to build the suite:

cd usr/src/suites/nfs/nfsv4
make install GNUC=""

 If there is no errors, the test executables will be installed in a directory under the "proto" tree, e.g. your_WS_ROOT/proto/root_`uname -p`/suites/nfs/nfsv4 directory . This will be the TESTROOT for the execution, in the NFSv4 client, we call this the localhost. This TESTROOT includes executables of test sub directories that group the tests in those areas e.g.:

acl basic_ops named_attrs num_attrs other_tests recovery srv_namespc 

 and other tools for setup and execution.

 This test suite is fully automated, where a few simple commands will setup the suite, run the tests, cleanup the systems, and generate results. Some prerequisites are required, but usually the default values will be used for the standard runs. Check out a file named nfs4test.env under $TESTROOT for the variables and the default values.

 Although it requires 2 test systems, including the localhost as NFSv4 client, the NFSv4 server. The client should be able to "rsh" to the server for the test setup.

 For example, the following commands will run the tests in the basic_ops and acl subdirs:

cd WS_ROOT/proto/root_`uname -p`/suites/nfs/nfsv4
SERVER=my_server_hostname; export SERVER
./runit -bl

 where the “-b” is for the “basic_ops” tests and “-l” is for the “acl” tests. Or you can type “./runit -x” to have it list the available test subdirs. Test results by default will be written to /usr/tmp/results directory.

 Users may comment out any subdirs they do not want to compile or user by modifying the values of “SUBDIRS=” in the .../nfsv4/tests/Makefile in the source tree when building the suite, or use options from "runit" or "runtests" scripts.

 Currently the tests are only running well with OpenSolaris systems, e.g. clients and servers. This is due to the limitations on the remote server configuration (where tests use "rsh"s).

 All tests can also run in the OpenSolaris non-global zones, with a regular server running OpenSolaris 10 and above.

Test Cases Overview

 This test suite is divided into different functional subdirs to test different areas of the NFSv4 client and server. Tests are written in C, ksh and TCL and automated for easy execution. The subdirs are:

  • acl
     This sub-directory consists of the "srv_tests" and "cmd_tests". The test cases under the "srv_tests" use the nfsv4shell toolto send over-the-wire different Setattr/Getattr operations with ACL attributes to verify correct server behavior. The test cases under the "cmd_tests" use user level commands getfacl(1) and setfacl(2) to test ACL over NFSv4 filesystem.
     Note, since there are tests for acl(2)/facl(2) written in other Solaris test suite (mstc), which can be run over NFS as well, we do not include those tests in this suite. We have planned to develop new tests for "chmod(1)" with ACL operation, for NFSv4 over ZFS filesystems.
  • basic_ops
     There are 31 sub-directories included in the directory. Each of these subdirs is related to the NFSv4 operations from RFC3530. All tests are TCL scripts using the nfsv4shell tool to test the NFSv4 server behavior. Many of the tests are negative tests to send over-the-wire with illegal compound operations to ensure server is not surprised and responds with correct errors.
  • named_attrs
     This directory consists of tests for testing the NFSv4 named attributes. There are TCL tests with nfsv4shell to test Nfsv4 server directly with OPENATTR op, and ksh tests using runat(1) command in OpenSolaris.
  • num_attrs
     This directory consists of tests for testing the NFSv4 mandatory and recommended attributes. These are TCL tests with GETATTR op to verify the attributes returned by server are correct.
  • srv_namespc
     This directory consists of tests to test the server name space, and the NFSv4 pseudo filesystem. Some tests specifically verify the pseudo nodes used in building the server filesystem tree, and make sure client and traverse the tree from server's root filesystem.
  • other_tests
     We put the other miscellaneous tests into this directory, which include some I18N tests and "nobody" (NFSv4 uid/gid domain name mapping) tests. The "domain" subdir in this directory consists of tests to verify the generation of the NFSMAPID_DOMAIN from /etc/default/nfs file, NIS and DNS, in OpenSolaris system.
  • recovery
     This directory consists tests for testing recovery (such as reboot, restart nfsd in server) of NFSv4 client and server. There are mostly "open" and "lock" tests to verify states recovered correctly. There are also tests for filesystem unshared and "open downgrade" tests. This subdir requires 3 test systems to run, and both the SERVER and CLIENT2 will be rebooted.

Test Results

 The tests can be run with different configurations, such as: server using UFS or ZFS filesystems, client (localhost) as system (in global zone), or in a non global zone. Test result baselines are different depending on how the tests are configured and run.

 The following is the baseline results for tests run from a client's global zone (the system) with the server using LOFI (UFS) and ZFS filesystems. The results with NOTINUSE/UNTESTED/UNSUPPORTED status are due to the test assertions are either not runable in current test environment, or not supported by Solaris, or scenarios cannot be tested at this time.

|
Test subdirs / Server test filesystem

LOFI/UFS

ZFS

acl

PASS: 241

PASS: 241

basic_ops

PASS: 708; UNSUPPORTED: 16 NOTINUSE: 5; UNTESTD: 4

PASS: 707; UNSUPPORTED: 16 NOTINUSE: 5; UNTESTD: 4; FAIL: 1

named_attrs

PASS: 22

PASS: 22

num_attrs

PASS: 66

PASS: 66

srv_namespc

PASS: 43; FAIL: 2

PASS: 43; FAIL: 2

other_tests

PASS: 128; UNTESTED: 2 FAIL: 7 UNRESOLVED: 3

PASS: 128; UNTESTED: 2 FAIL: 7 UNRESOLVED: 3

recovery

PASS: 13

PASS: 13

 Note: the above results obtained from client and servers running OpenSolaris 2008.11 release . The details of the knonw failures listed above can be found from the "Test Results and Baselines" section from the Download Center .

last modified by admin on 2009/10/26 12:08
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.