Nfs-utils unit tests
From Linux NFS
Revision as of 21:43, 15 August 2007 by Chucklever
Add unit test infrastructure to nfs-utils
- For an example, see the t/ directory in the git source repository. I don't think these scripts are original to git.
- Separate infrastructure can be used to test the mount commands, the exportfs command, and rpc.mountd, in order to break the project up into smaller bite-size chunks.
- By setting up an NFS client and server on the same host, the unit test scripts can easily manipulate both sides of the traffic, and apply iptables filters as needed to emulate typical firewall configurations.
- The mount should be done in a chroot jail so it doesn't disturb the system's real /etc/fstab and /etc/mtab. In addition we can fix the contents of both files and thus test the side-effects of our test mounts more easily.
- Unit tests can also act as regression tests for distributors.
- These tests document how the NFS utilities need to behave in the presence of varying network conditions. As we modify existing tools and provide new ones, we will need to understand the operational requirements and history before implementing any changes.