diagnostics: add tptest_stop functionality