]> git.proxmox.com Git - mirror_zfs.git/commit
test-runner: pass kmemleak and kmsg to Cmd.run
authorAntonio Russo <aerusso@aerusso.net>
Mon, 15 May 2023 23:11:33 +0000 (17:11 -0600)
committerGitHub <noreply@github.com>
Mon, 15 May 2023 23:11:33 +0000 (16:11 -0700)
commite0d5007bcf7e4425d43ba2ad56489c7db5c4a4c5
tree2660f166b03c4f2f67d283db6aba796b9cddae58
parentee7b71dbc919439b1db6352bcd95f121127b42dd
test-runner: pass kmemleak and kmsg to Cmd.run

test-runner.py orchestrates all of the ZTS executions. The `Cmd` object
manages these process, and its `run` method specifically invokes these
possibly long-running processes, possibly retrying in the event of a
timeout. Since its inception, memory leak detection using the kmemleak
infrastructure [1], and kernel logging [2] have been added to this run
mechanism.

However, the callback to cull a process beyond its timeout threshold,
`kill_cmd`, has evaded modernization by both of these changes. As a
result, this function fails to properly invoke `run`, leading to an
untrapped exception and unreported test failure.

This patch extends `kill_cmd` to receive these kernel devices through
the `options` parameter, and regularizes all the `.run` calls from
`Cmd`, and its subclasses, to accept that parameter.

[1] Commit a69765ea5b563e0cd4d15fac4b1ac08c6ccf12d1
[2] Commit fc2c0256c55a2859d1988671b0896d22b75c8aba

Reviewed-by: John Wren Kennedy <john.kennedy@delphix.com>
Signed-off-by: Antonio Russo <aerusso@aerusso.net>
Closes #14849
tests/test-runner/bin/test-runner.py.in