]> git.cworth.org Git - tar/blob - tests/sigpipe.at
upstream: Fix extraction of device nodes.
[tar] / tests / sigpipe.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright (C) 2010 Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 AT_SETUP([sigpipe handling])
20 AT_KEYWORDS([sigpipe])
21
22 # Description: Tar 1.23 ignored sigpipe which lead to spurious "write
23 # error" diagnostics when piping output to another programs.
24 # Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
25 # References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html
26 #             <20100319184141.GC30047@wo.int.altlinux.org>
27
28 AT_CHECK([
29 genfile --length 2048 --file first
30 genfile --length 2048 --file second
31 genfile --length 2049 --file third
32
33 tar cf archive first second third
34
35 tar tf archive | :
36 ],
37 [0])
38
39 AT_CLEANUP