HomeFreeBSD

test-runner: pass kmemleak and kmsg to Cmd.run

Description

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

Details

Provenance
Antonio Russo <aerusso@aerusso.net>Authored on May 15 2023, 11:11 PM
GitHub <noreply@github.com>Committed on May 15 2023, 11:11 PM
Parents
rGee7b71dbc919: Fix undefined behavior in spa_sync_props()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGe0d5007bcf7e: test-runner: pass kmemleak and kmsg to Cmd.run (authored by Antonio Russo <aerusso@aerusso.net>).May 15 2023, 11:11 PM