From 5c593bf700013bfbd1c84da1c77590124369f0f0 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Tue, 3 Sep 2024 17:04:07 -0700 Subject: [PATCH 1/2] include backtrace from omdb panic from within omdb tests --- dev-tools/omdb/tests/test_all_output.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev-tools/omdb/tests/test_all_output.rs b/dev-tools/omdb/tests/test_all_output.rs index d266e59ce8..ce0fbe74d5 100644 --- a/dev-tools/omdb/tests/test_all_output.rs +++ b/dev-tools/omdb/tests/test_all_output.rs @@ -502,11 +502,11 @@ async fn do_run_extra( tokio::task::spawn_blocking(move || { let exec = modexec( Exec::cmd(cmd_path) - // Set RUST_BACKTRACE for consistency between CI and - // developers' local runs. We set it to 0 only to match - // what someone would see who wasn't debugging it, but we - // could as well use 1 or "full" to store that instead. - .env("RUST_BACKTRACE", "0") + // Set RUST_BACKTRACE explicitly for consistency between CI + // and developers' local runs. We set it to 1 so that in + // the event of a panic, particularly in CI, we have more + // information about what went wrong. + .env("RUST_BACKTRACE", "1") .args(&owned_args), ); run_command(exec) From f013c171a20599a2f048bd24ea0f84db95e30031 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Tue, 3 Sep 2024 17:23:53 -0700 Subject: [PATCH 2/2] do not print stacktraces for all the Errors that we cleanly handle --- dev-tools/omdb/tests/test_all_output.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev-tools/omdb/tests/test_all_output.rs b/dev-tools/omdb/tests/test_all_output.rs index ce0fbe74d5..5de82b74c2 100644 --- a/dev-tools/omdb/tests/test_all_output.rs +++ b/dev-tools/omdb/tests/test_all_output.rs @@ -505,8 +505,12 @@ async fn do_run_extra( // Set RUST_BACKTRACE explicitly for consistency between CI // and developers' local runs. We set it to 1 so that in // the event of a panic, particularly in CI, we have more - // information about what went wrong. + // information about what went wrong. But we set + // RUST_LIB_BACKTRACE=1 so that we don't get a dump to + // stderr for all the Errors that get created and handled + // gracefully. .env("RUST_BACKTRACE", "1") + .env("RUST_LIB_BACKTRACE", "0") .args(&owned_args), ); run_command(exec)