From: John Mulligan Date: Tue, 18 Mar 2025 23:26:59 +0000 (-0400) Subject: run-make-check.sh: handle sudo and command that may not run in container X-Git-Tag: testing/wip-jcollin-testing-20251010.002614-squid~5^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3aeb67e0530712bf54553d2959cd6882926714c2;p=ceph-ci.git run-make-check.sh: handle sudo and command that may not run in container Work around a known failure that sudo is not expected to be present in container images. Prepare to handle a failure to set a sysctl param. Signed-off-by: John Mulligan (cherry picked from commit 9f44155dff195015186315968a0a1e8ce925ed5d) --- diff --git a/run-make-check.sh b/run-make-check.sh index c4190a6426c..264cac65c18 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -47,7 +47,8 @@ function run() { fi local aiomax="$((65536 * procs))" if [ "$(/sbin/sysctl -n fs.aio-max-nr )" -lt "${aiomax}" ]; then - $DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr="${aiomax}" + wrap_sudo + $DRY_RUN $SUDO /sbin/sysctl -q -w fs.aio-max-nr="${aiomax}" || true fi CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}