fix(t/evaluator/evaluate-oom): check that the exit value of the systemd-run check is zero. Rework skip messages

This commit is contained in:
Kayla Firestack 2022-05-02 15:13:59 -04:00
parent e917d9e546
commit 013a1dcabc

View file

@ -4,8 +4,9 @@ use Setup;
use Test2::V0;
use Hydra::Helper::Exec;
my $sd_res;
eval {
captureStdoutStderr(3, (
($sd_res) = captureStdoutStderr(3, (
"systemd-run",
"--user",
"--collect",
@ -16,8 +17,9 @@ eval {
"true"
));
} or do {
skip_all("systemd-run does not work in this environment");
skip_all("`systemd-run` failed when invoked in this environment");
};
if ($sd_res != 0) { skip_all("`systemd-run` returned non-zero when executing `true` (expected 0)"); }
my ($res, $stdout, $stderr) = captureStdoutStderr(60, (
"systemd-run",