From d5f127ed1cd3d5bbf19c32120a1e25c3b1cb2ae0 Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Thu, 26 Sep 2024 14:45:16 +0200 Subject: [PATCH] Print stderr if pfctl errors --- tests/helper/pfcli.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/helper/pfcli.rs b/tests/helper/pfcli.rs index 01e4532..5eedc1e 100644 --- a/tests/helper/pfcli.rs +++ b/tests/helper/pfcli.rs @@ -15,7 +15,8 @@ pub fn is_enabled() -> bool { } else if str.starts_with("Status: Disabled") { false } else { - panic!("Invalid response."); + let stderr = str_from_stdout(&output.stderr); + panic!("Invalid output from pfctl ({}), stdout:\n{str}\nstderr:\n{stderr}", output.status); } }