From 987999970a929addd3ba4a748df0ef4cb297006e Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Mon, 13 Jun 2022 21:33:32 +1000 Subject: [PATCH] Fix no-command-error igr test if cgroup cannot be determined --- src/igr-tests/no-command-error/run-test.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/igr-tests/no-command-error/run-test.sh b/src/igr-tests/no-command-error/run-test.sh index ca0ec8f7..c8ca6433 100755 --- a/src/igr-tests/no-command-error/run-test.sh +++ b/src/igr-tests/no-command-error/run-test.sh @@ -5,7 +5,14 @@ rm -f dinit-run.log -../../dinit -d sd -u -p socket -q \ +# If cgroups support, supply cgroup base path to avoid potential "unable to determine +# cgroup" message +CGROUPS_BASE="" +if ../../dinit --version | grep -q " cgroups"; then + CGROUPS_BASE="-b \"\"" +fi + +../../dinit -d sd -u -p socket -q $CGROUPS_BASE \ no-command -l dinit-run.log STATUS=FAIL