# <20100319184141.GC30047@wo.int.altlinux.org>
AT_CHECK([
+AT_SIGPIPE_PREREQ
+
genfile --length 2048 --file first
genfile --length 2048 --file second
genfile --length 2049 --file third
tar cf archive first second third
-tar tf archive | :
+# Discard diagnostics that some shells generate about broken pipes.
+(tar tf archive 2>&3 | :) 3>&2 2>/dev/null
],
[0])