• Sasha Goldshtein's avatar
    tests: Add smoke tests for most tools · 5c41b39b
    Sasha Goldshtein authored
    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.
    5c41b39b
test_tools_smoke.py 13.3 KB