diff --git a/build-scripts/prepare-testmachine-chroot b/build-scripts/prepare-testmachine-chroot index 4b1ebbe85..dbdbb3d71 100755 --- a/build-scripts/prepare-testmachine-chroot +++ b/build-scripts/prepare-testmachine-chroot @@ -21,9 +21,9 @@ CHROOT_ROOT=$HOME/testmachine-chroot/ sudo mkdir -p "$CHROOT_ROOT" # Clean up previous chroot state by killing any processes that are using the CHROOT_ROOT directory. -sudo "$FUSER" -k "$CHROOT_ROOT" || true +sudo "$FUSER" -k "$CHROOT_ROOT" >/dev/null 2>&1 || true # Unmount the /proc filesystem if it was previously mounted inside the chroot. -sudo umount "${CHROOT_ROOT}proc" || true +sudo umount "${CHROOT_ROOT}proc" >/dev/null 2>&1 || true # Tell rsync not to touch the BASEDIR and PREFIX directories echo "P $BASEDIR" >"$TRANSFER_SCRIPT" diff --git a/build-scripts/test-on-testmachine b/build-scripts/test-on-testmachine index d1e37643a..31ebb0ea5 100755 --- a/build-scripts/test-on-testmachine +++ b/build-scripts/test-on-testmachine @@ -51,7 +51,7 @@ chroot) # Minilogd may sometimes launch on RedHat without any user # intervention. Ignore that. # shellcheck disable=SC2009 - if ps -ef | grep -E "^ *[^ ]+ +$pid" | grep minilogd; then + if ps -ef 2>/dev/null | grep -E "^ *[^ ]+ +$pid" | grep -q minilogd; then continue fi ;; @@ -59,7 +59,7 @@ chroot) # gpg-agent sometimes is spawned on suse during our tests. # This happens only in chroot. Ignore that. - if ps -o command --pid "$pid" | grep "gpg-agent --homedir /var/tmp/zypp.*zypp-trusted.*--daemon"; then + if ps -o command --pid "$pid" 2>/dev/null | grep -q "gpg-agent --homedir /var/tmp/zypp.*zypp-trusted.*--daemon"; then continue fi ;; @@ -67,7 +67,7 @@ chroot) # gpg-agent sometimes is spawned on Ubuntu 24 during our tests. # This happens only in chroot. Ignore that. if [ "$OS_VERSION_MAJOR" = "24" ]; then - if ps -o command --pid "$pid" | grep "gpg-agent --homedir /etc/apt/sources.list.d/.gnupg-temp --use-standard-socket --daemon"; then + if ps -o command --pid "$pid" 2>/dev/null | grep -q "gpg-agent --homedir /etc/apt/sources.list.d/.gnupg-temp --use-standard-socket --daemon"; then continue fi fi