summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-10-31 01:03:01 +0100
committerGuillem Jover <guillem@debian.org>2016-10-31 01:05:23 +0100
commitdd13047c47def1f54696527eee9769c57b98ac90 (patch)
treeed89ea9db7de266d14c52d0d2e233395c1bd8a1f
parentf074889198fa4099474b068a611ebd56bbfc20d8 (diff)
downloaddpkg-dd13047c47def1f54696527eee9769c57b98ac90.tar.gz
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.
-rw-r--r--t-func/atlocal.in3
-rw-r--r--t-func/deb-split.at4
2 files changed, 3 insertions, 4 deletions
diff --git a/t-func/atlocal.in b/t-func/atlocal.in
index e37209349..9b8a44129 100644
--- a/t-func/atlocal.in
+++ b/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
diff --git a/t-func/deb-split.at b/t-func/deb-split.at
index 181db6244..8ca6e2791 100644
--- a/t-func/deb-split.at
+++ b/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
])