Browse Source

test: Simply ignore yes(1) error messages

While this is suboptimal, this is pretty much the only sane option we've
got, as we cannot (per POSIX) reset a signal disposition that was set to
IGNORE when the non-interactive shell got executed.

This partially reverts commit f074889198fa4099474b068a611ebd56bbfc20d8
which was just wrong.
Guillem Jover 7 years ago
parent
commit
dd13047c47
2 changed files with 3 additions and 4 deletions
  1. 0 3
      t-func/atlocal.in
  2. 3 1
      t-func/deb-split.at

+ 0 - 3
t-func/atlocal.in

@@ -19,9 +19,6 @@ unset BZIP
 unset XZ_OPT
 unset XZ_DEFAULTS
 
-# Restore SIGPIPE to a sane default state.
-trap - PIPE
-
 if [ "$(id -u)" = 0 ]; then
   ASROOT=
 elif which fakeroot >/dev/null; then

+ 3 - 1
t-func/deb-split.at

@@ -14,7 +14,9 @@ DPKG_MOD_CONTROL([pkg-split],
 AT_CHECK([
 # Initialize the template package
 chmod -R u+w pkg-split
-yes | dd of=pkg-split/data-file bs=1024 count=1024 status=none
+# XXX: Some environments set SIGPIPE to ignore which we cannot reset, and yes
+# does check print error conditions, so we ignore its error message here.
+yes 2>/dev/null | dd of=pkg-split/data-file bs=1024 count=1024 status=none
 find pkg-split | xargs touch -t 197001010100.00
 $ASROOT dpkg-deb -b -Znone pkg-split >/dev/null
 ])