From 3bb2a2a6142f3b43f3038ee0572fa0a6344fd650 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 4 Sep 2025 16:26:57 -0600 Subject: [PATCH] t/op/magic.t redirect stderr to /dev/null This file calls ps(1), assuming that ps accepts the 'h' and 'hc' options. This is non-portable. The comments in the code indicate that these tests are optional; just skip them if the ps doesn't work. The problem is that noise gets generated on such platforms. Simply redirect stderr to /dev/null, suppressing any warnings. --- t/op/magic.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/op/magic.t b/t/op/magic.t index adaffa9fd247..6a84e63c43d6 100644 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -412,7 +412,8 @@ EOP # work (like if the system doesn't have a ps(1) for whatever # reason) just bail out gracefully. my $maybe_ps = sub { - my ($cmd) = @_; + my ($cmd) = @_ ; + $cmd .= " 2>$::devnull"; local ($?, $!); no warnings;