NFS share and mount Test Suite
Introduction
The NFS share/mount test suite (sharemnt) is newly developed for testing combinations of basic options of share_nfs (1M) and mount_nfs (1M) commands. This test suite uses the STF (Solaris Test Framework ) test harness, and its dynamic test assertion generation feature to provide large test coverage with less codes. Both source codes and test executable (in Solaris packages format) can be downloaded from the Download center.
This test suite is divided into subdirs based on test areas, which includes:
- |
Subdir Names
NFS Areas covered |
basic |
Basic share_nfs and mount_nfs options, e.g. rw, ro, proto=, vers= |
accesslist |
Correct access of rw/ro options of share_nfs and mount_nfs, including accesslist with IP address |
krb5 |
The “sec=krb5*” share_nfs and mount_nfs options; krb5tools is required |
misc_opts |
Tests for misc share_nfs and mount_nfs, including public, anon, nosuid, rsize, wsize/ quota, etc. |
nfslogd |
Tests for NFS logging for NFSv2 and NFSv3 |
Others |
Misc tests do not belong to the other areas |
Sharetab |
Tests for the in-kernel sharetab |
Stress |
Stress tests for lots of shares and mounts |
Currently there are close to total of 6000 test cases. Most of the tests are ksh scripts; so 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.
Since the test suite includes krb5 tests, e.g. testing server exports filesystems with sec=krb5:krb5i:krb5p options and client mounts these test filesystems with the krb5 security flavors, both the server and client system under test must setup with kerberos V principles. We use the krb5tools that is available (with source and package forms) at the download center, for the setup, of KDC and NFS service principles. Make sure you have installed the tool in the localhost (the test client) before the test configuration and setup.
The How-to's for building, configuration and running the test suite are documented in the README file from either the source tarball, or the test suite package.
Users can configure and run one subdir at a time, if you are only interested in testing certain areas. The following example will configure and run only the basic tests:
# cd _the_testsuite_src_location_/sharemnt/tests/basic
# stf_configure -c "SERVER=myserver"
# stf_execute -m i386
# stf_unconfigure
The test cases will be generated during the "stf_configure" phase. If you want to run the tests from other subdirs as well, you can do the "stf_configure" from the suite level, e.g. .../sharemnt directory. Then cd into a particular subdir to run the tests you want. For example:
# cd _the_testsuite_src_location_/sharemnt
# stf_configure -c "SERVER=myserver"
# cd tests/basic; stf_execute -m i386
# cd tests/sharetab; stf_execute -m i386
# stf_unconfigure
All test results will be stored at /var/tmp/sharemnt/results directory of the “local host” that started the tests
This test suite is fully automated with STF test harness. Both the client and server systems will be cleaned up once the "stf_unconfigure" command is run.
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, and how server exports NFS filesystems).
All tests can also run in the OpenSolaris non-global zones, with a regular server running Solaris 10 and above.
Test Cases Overview
This test suite is divided into different functional subdirs to test different areas of the share_nfs and mount_nfs, and automated for easy execution. Most test cases will go to the $SERVER, share the test filesystem with the test options, then have the client to manually mount and automount the test filesystem with verification of simple read/write and readdir test.
The subdirs are:
- basic - current includes the combination of the following options:
server SHROPTS="sec=sys rw anon=0"
client MNTOPTS="rw sec=sys ro hard proto=tcp proto=udp"
and VEROPTS="default vers=4 vers=3 vers=2" - accesslist - current includes the combination of the following options:
server SHROPTS="sec=none rw public"
client MNTOPTS="rw or ro with hsotname, group, domain"
and VEROPTS="default vers=4 vers=3 vers=2" - krb5 - current includes the combination of the following options:
server SHROPTS="sec=krb5,krb5i,krb5p"
client MNTOPTS="default sec=krb5 sec=krb5i sec=krb5p"
and VEROPTS="default vers=4 vers=3 vers=2"
there are also tests for gsscred, different encrypt type, etc. - misc_opts - current includes the combination of the following options:
server SHROPTS="ro, anon=98765 public, nosuid"
client MNTOPTS="rw, ro, hard, public, intr hard, rsize, wsize and quota"
and VEROPTS="default vers=4 vers=3 vers=2" - nfslogd - current includes the combination of the following options:
server SHROPTS= different log= tags
client MNTOPTS=rw
and VEROPTS="vers=3 vers=2" - <>others - current includes tests for dfstab and misc mount tests
- sharetab - current includes tests for testing the features of in-kernel sharetab
- stress - current includes tests for stress the sharemgr
Test results 1
- |
Subdir Names
Test results |
basic |
PASS: 2338 FAIL: 1093 |
accesslist |
PASS: 1318 |
krb5 |
PASS: 650 FAIL: 180 |
misc_opts |
PASS: 254 |
nfslogd |
PASS: 36 |
others |
PASS: 3 |
sharetab |
PASS: 5 UNTESTED: 1 |
stress |
PASS: 1 UNTESTED:1 FAIL:12 |
- the above results obtained from client and servers running OpenSolaris 2008.11 release
- The details of the known failures listed above can be found from the bug database (http://bugs.opensolaris.org/ , select product “stc” category “nfs” and subcategory sharemnt)
The test results baselines can be downloaded at : http://dlc.sun.com/osol/test/downloads/current