From 3ec7ae6746bf1a0c929222156ab9ff16f871e075 Mon Sep 17 00:00:00 2001 From: Nikita Smith Date: Wed, 29 Apr 2026 00:08:11 -0700 Subject: [PATCH] explain failed launch --- src/torture/torture.h | 7 ++++++- src/torture/torture_dbg.c | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/torture/torture.h b/src/torture/torture.h index 36d0fe90..6d7e274c 100644 --- a/src/torture/torture.h +++ b/src/torture/torture.h @@ -66,7 +66,12 @@ internal void t_break_if_debugger_present(void); TEST_(name) \ T_RunSig(name) -#define T_Ok(c) do { if (!(c)) { result_out->fail_file = __FILE__; result_out->fail_line = __LINE__; result_out->fail_cond = Stringify(c); result_out->status = T_RunStatus_Fail; t_break_if_debugger_present(); return; } } while(0) +#define T_Ok(c) do { if (!(c)) { \ + *result_out = (T_RunResult){ .fail_file = __FILE__, .fail_line = __LINE__, .fail_cond = Stringify(c) }; \ + t_break_if_debugger_present(); \ + return; \ +} } while(0) + #define T_MatchLinef(out, ...) T_Ok(t_match_linef(out, __VA_ARGS__)) #define t_outf(...) str8_list_pushf(arena, test_out, ## __VA_ARGS__) diff --git a/src/torture/torture_dbg.c b/src/torture/torture_dbg.c index e8973ac2..07298994 100644 --- a/src/torture/torture_dbg.c +++ b/src/torture/torture_dbg.c @@ -641,8 +641,11 @@ T_RunSig(dbg_script_runner) // launch targets for EachNode(directive, T_DbgScriptDirective, script.directives[OperatingSystem_CURRENT][T_DbgScriptDirectiveKind_Launch].first) { - String8 cmdl = str8f(arena, "--user:%S.raddbg_user %S ", t_make_file_path(arena, str8_lit("temp")), directive->args); - T_Ok(t_dbg_launch(cmdl, ENDT_SEC(10))); + String8 cmdl = str8f(arena, "--user:%S.raddbg_user %S", t_make_file_path(arena, str8_lit("temp")), directive->args); + if ( ! t_dbg_launch(cmdl, ENDT_SEC(10))) { + t_outf("failed to launch debugger with command line \"%S %S\" work dir \"%S\"\n", t_raddbg_path(), cmdl, g_wdir); + T_Ok(0); + } } // debugger is ready, now call script