Testing of Linux File System Drivers
https://doi.org/10.15514/ISPRAS-2012-23-24
Abstract
The paper investigates issues of Linux file system driver testing. Linux file system drivers are implemented as kernel modules, which works in the same address space as kernel core. For that reason, the driver should be very reliable. It should react adequately to incorrect file system images, to faults in operating system, etc. Also drivers should free all resources it requests as far as kernel have to work for long time without restart. Another important feature of file system drivers is that they are programs with multiple entry points, which may be executed simultaneously in respect with each other and with other kernel code.
Most of existing test systems verify only driver's behavior in normal situations by calling system calls, which are eventually dispatched by the kernel into the driver's functions. Some of them also check driver in concurrent scenarios but only at very basic level. Some test systems also verify driver's behavior under faulty environment, when request for memory allocation or disk read/write may fail. But fault scenarios used in those systems are probabilistic, which leads to problems with tests' reproducibility and requires to repeat tests many times to achieve better coverage. There is one test system, which checks for memory leaks in the driver under test.
The paper concludes by statement of requirements for more throughout file system driver testing. According to the requirements a test system have to cover the following aspects:
- Normal scenarios on system calls level.
- Parallel scenarios with additional checks for data races.
- Fault scenarios with insufficient memory and faulty block devices using such techniques as fault injection.
- Handling of incorrect file system images.
- Driver testing on system calls with invalid arguments.
- Check leaks of memory and other resources requested by driver under test.
About the Authors
A. V. TsyvarevRussian Federation
V. A. Martirosyan
Armenia
References
1. Linux kernel bugzilla, https://bugzilla.kernel.org, 01.10.2012(дата обращения)
2. V.S.Mutilin, E.M. Novikov, A.V. Khoroshilov. Аnaliz tipovykh oshibok v drajverakh operatsionnoj sistemy Linux [Analysis of typical faults in Linux operating system drivers]. Trudy ISP RАN [The Proceedings of ISP RAS], 2012, vol. 22, pp. 349-374 (in Russian).
3. Autotest Framework, http://autotest.kernel.org.
4. Linux Test Project, http://ltp.sourceforge.net.
5. Phoronix Test Suite, http://www.phoronix-test-suite.com.
6. Open Linux VERification Project, http://linuxtesting.org/olver.
7. Subrata.M, Balbir S., Masatake Y., Putting LTP to test – Validating both the Linux kernel and Test-cases. http://ltp.sourceforge.net/documentation/technical_papers/Putting_LTP_to_Test.pdf, 2009.
8. SUSE YES Certified Program, http://www.novell.com/developer/yes/, 2012.
9. Red Hat Hardware Program, http://www.redhat.com/rhel/compatibility/hardware, 2012.
10. Oracle Hardware Certification Program, http://www.oracle.com/webfolder/technetwork/hcl/hcts/index.html, 2012.
11. Canonical's certification service, http://www.canonical.com/engineering-services/certification/hardware-certification, 2012.
12. Xfstests sources, http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git.
13. Fault injection capabilities infrastructure, http://www.mjmwired.net/kernel/Documentation/fault-injection/
14. KEDR Project, http://linuxtesting.org/kedr.
15. OCFS2 tools sources, https://github.com/jjzhang/ocfs2-tools.
16. XFS user utilities sources, http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfsprogs.git.
17. Kernel memory Leak Detector, http://www.mjmwired.net/kernel/Documentation/kmemleak.txt.
Review
For citations:
Tsyvarev A.V., Martirosyan V.A. Testing of Linux File System Drivers. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2012;23. (In Russ.) https://doi.org/10.15514/ISPRAS-2012-23-24