Reputation: 24748
I have an embedded linux device. I am trying to come up with some test cases that would exercise various subsystems, code paths, system calls in the kernel to identify problems/loose ends in the kernel that lead to kernel panics. Can someone suggest some test ideas for this kind of testing ?
Otherwise also, can someone suggest some ideas for testing the kernel so that it could be made more stable, robust, efficient, fast etc ? Can we write unit tests for linux kernel ?
Upvotes: 3
Views: 1063
Reputation: 6389
For system calls tests you could use the POSIX Test Suite.
The test suite divides tests into several categories:
Conformance, Functional, Stress, Performance, and Speculative.
The last three are probably of most importance to you.
You could also take a peek at Stress-testing the Linux kernel article at IBM regarding the Linux Test Project.
Upvotes: 1
Reputation: 63538
It depends what kind of device it is. If it is a block device, you should try running lots of different filesystems on it (ideally all of them), and hammer them hard with loads of processes.
If the device supports only a single open, then that file descriptor can still be shared between processes (which can all hammer the device)
Upvotes: 0
Reputation: 30969
The Linux Test Project looks like it might have some of what you want. There seem to be some tools for fuzz testing parts of the kernel, but those mostly related to filesystems and network protocols.
Upvotes: 1