Skip to content

Commit 326bf73

Browse files
authored
Merge pull request #2113 from larsewi/suppress-expected-failure-stderr
ENT-12619: Suppress stderr from expected-failure commands
2 parents eee4ac0 + ffaf67f commit 326bf73

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build-scripts/prepare-testmachine-chroot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ CHROOT_ROOT=$HOME/testmachine-chroot/
2121
sudo mkdir -p "$CHROOT_ROOT"
2222

2323
# Clean up previous chroot state by killing any processes that are using the CHROOT_ROOT directory.
24-
sudo "$FUSER" -k "$CHROOT_ROOT" || true
24+
sudo "$FUSER" -k "$CHROOT_ROOT" >/dev/null 2>&1 || true
2525
# Unmount the /proc filesystem if it was previously mounted inside the chroot.
26-
sudo umount "${CHROOT_ROOT}proc" || true
26+
sudo umount "${CHROOT_ROOT}proc" >/dev/null 2>&1 || true
2727

2828
# Tell rsync not to touch the BASEDIR and PREFIX directories
2929
echo "P $BASEDIR" >"$TRANSFER_SCRIPT"

build-scripts/test-on-testmachine

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,23 @@ chroot)
5151
# Minilogd may sometimes launch on RedHat without any user
5252
# intervention. Ignore that.
5353
# shellcheck disable=SC2009
54-
if ps -ef | grep -E "^ *[^ ]+ +$pid" | grep minilogd; then
54+
if ps -ef 2>/dev/null | grep -E "^ *[^ ]+ +$pid" | grep -q minilogd; then
5555
continue
5656
fi
5757
;;
5858
suse)
5959

6060
# gpg-agent sometimes is spawned on suse during our tests.
6161
# This happens only in chroot. Ignore that.
62-
if ps -o command --pid "$pid" | grep "gpg-agent --homedir /var/tmp/zypp.*zypp-trusted.*--daemon"; then
62+
if ps -o command --pid "$pid" 2>/dev/null | grep -q "gpg-agent --homedir /var/tmp/zypp.*zypp-trusted.*--daemon"; then
6363
continue
6464
fi
6565
;;
6666
ubuntu)
6767
# gpg-agent sometimes is spawned on Ubuntu 24 during our tests.
6868
# This happens only in chroot. Ignore that.
6969
if [ "$OS_VERSION_MAJOR" = "24" ]; then
70-
if ps -o command --pid "$pid" | grep "gpg-agent --homedir /etc/apt/sources.list.d/.gnupg-temp --use-standard-socket --daemon"; then
70+
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
7171
continue
7272
fi
7373
fi

0 commit comments

Comments
 (0)