tests: Add smoke tests for most tools
authorSasha Goldshtein <goldshtn@gmail.com>
Tue, 14 Feb 2017 01:09:05 +0000 (20:09 -0500)
committerSasha Goldshtein <goldshtn@gmail.com>
Sat, 11 Mar 2017 19:41:36 +0000 (19:41 +0000)
commit5c41b39b308eb9d2083f0fa966817975613b9a0a
treee10957fb2cec5f2ac09065c35f5ece8459fff7cb
parent2febc297ef590fa6a6021c737e28f5e467275bca
tests: Add smoke tests for most tools

This commit adds basic smoke tests for most tools in tools/ by
running the tool with either a short duration, or interrupting it
with a SIGINT after a short duration. The tests check the return
value from the tool to detect any Python exceptions or other
errors, but they do not read the standard error or standard output
and parse the tool's result.

Some tools are not covered by these smoke tests for reasons
documented in the test itself:

* btrfsdist and btrfsslower need btrfs
* cachetop doesn't like to run without a terminal
* dbslower, dbstat, and mysqld_qslower need a database engine
* deadlock_detector allocates a huge amount of memory
* softirqs doesn't work on new kernels and needs fixing (#1031)
* ugc needs a USDT-enabled runtime with GC probes
* zfsdist and zfsslower need zfs

This is a good place to start, but clearly for some tools,
especially those with a complex interface like trace and argdist,
we need more than just basic smoke tests.
tests/python/CMakeLists.txt
tests/python/test_tools_smoke.py [new file with mode: 0755]