X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=tests%2Fsigpipe.at;fp=tests%2Fsigpipe.at;h=9edca77cf13a971b63421c321592ccaf427e97a2;hp=0000000000000000000000000000000000000000;hb=b414e25de8ca49d7567a92c203d431383ec57c83;hpb=29ece34f44a27750bbfd76154ad9882580453dc7 diff --git a/tests/sigpipe.at b/tests/sigpipe.at new file mode 100644 index 0000000..9edca77 --- /dev/null +++ b/tests/sigpipe.at @@ -0,0 +1,39 @@ +# Process this file with autom4te to create testsuite. -*- Autotest -*- + +# Test suite for GNU tar. +# Copyright (C) 2010 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +AT_SETUP([sigpipe handling]) +AT_KEYWORDS([sigpipe]) + +# Description: Tar 1.23 ignored sigpipe which lead to spurious "write +# error" diagnostics when piping output to another programs. +# Reported-by: "Dmitry V. Levin" +# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html +# <20100319184141.GC30047@wo.int.altlinux.org> + +AT_CHECK([ +genfile --length 2048 --file first +genfile --length 2048 --file second +genfile --length 2049 --file third + +tar cf archive first second third + +tar tf archive | : +], +[0]) + +AT_CLEANUP