]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
run-make-check.sh: handle sudo and command that may not run in container 62324/head
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 18 Mar 2025 23:26:59 +0000 (19:26 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 19 Mar 2025 20:08:04 +0000 (16:08 -0400)
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 <jmulligan@redhat.com>
run-make-check.sh

index c4190a6426c53a8e42d10b0d0c486dc750219129..264cac65c18d229f25af36838ff8b1c0157816cf 100755 (executable)
@@ -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}