1 commit a3f1d933cc5e61037100f5e60eac45764b8b4b50
2 Author: Sergey Poznyakoff <gray@gnu.org.ua>
3 Date: Thu Mar 11 12:19:32 2010 +0200
7 * src/names.c (collect_and_sort_names): Initialize prev_name.
8 Reported by Dmitry V. Levin.
10 diff --git a/src/names.c b/src/names.c
11 index 1146020..ea2ce76 100644
14 @@ -871,7 +871,7 @@ void
15 collect_and_sort_names (void)
18 - struct name *next_name, *prev_name;
19 + struct name *next_name, *prev_name = NULL;
23 commit 67b4f3519d838c6f16f5b6b63c0b9b8669fb3dd9
24 Author: Sergey Poznyakoff <gray@gnu.org.ua>
25 Date: Fri Mar 12 09:48:46 2010 +0200
29 * src/buffer.c (check_label_pattern): Initialize result.
30 * tests/remfiles01.at: Skip if run with root privileges.
32 diff --git a/src/buffer.c b/src/buffer.c
33 index 8e1bb9b..dfc8456 100644
36 @@ -1374,7 +1374,7 @@ static bool
37 check_label_pattern (const char *label)
41 + bool result = false;
43 if (fnmatch (volume_label_option, label, 0) == 0)
45 diff --git a/tests/remfiles01.at b/tests/remfiles01.at
46 index 940fd95..73752b4 100644
47 --- a/tests/remfiles01.at
48 +++ b/tests/remfiles01.at
49 @@ -30,6 +30,7 @@ AT_KEYWORDS([create remove-files remfiles01 gzip])
53 +AT_UNPRIVILEGED_PREREQ
57 commit 340dbf5aabfee4e1e657f8ebf202a2fee1750a63
58 Author: Sergey Poznyakoff <gray@gnu.org.ua>
59 Date: Sat Mar 20 13:14:31 2010 +0200
61 Fix undesired error exit on receiving SIGPIPE.
63 * src/tar.c: Do not ignore SIGPIPE.
64 * tests/sigpipe.at: New testcase.
65 * tests/Makefile.am, tests/testsuite.at: Add sigpipe.at
66 * tests/remfiles01.at: Fix error code expectation.
69 diff --git a/src/tar.c b/src/tar.c
70 index e3fdf7b..b127963 100644
73 @@ -2570,8 +2570,6 @@ main (int argc, char **argv)
75 obstack_init (&argv_stk);
77 - /* Ensure default behavior for some signals */
78 - signal (SIGPIPE, SIG_IGN);
79 /* System V fork+wait does not work if SIGCHLD is ignored. */
80 signal (SIGCHLD, SIG_DFL);
82 diff --git a/tests/Makefile.am b/tests/Makefile.am
83 index 8f16244..31811b0 100644
84 --- a/tests/Makefile.am
85 +++ b/tests/Makefile.am
86 @@ -127,6 +127,7 @@ TESTSUITE_AT = \
94 diff --git a/tests/remfiles01.at b/tests/remfiles01.at
95 index 73752b4..86b5c03 100644
96 --- a/tests/remfiles01.at
97 +++ b/tests/remfiles01.at
98 @@ -52,7 +52,9 @@ EC=$?
99 sed -n '/(child)/p' err >&2
103 +# Gzip exit code is propagated to the shell. Usually it is
104 +# 141. We convert all non-zero exits to 2 to make it predictable.
109 diff --git a/tests/sigpipe.at b/tests/sigpipe.at
111 index 0000000..9edca77
113 +++ b/tests/sigpipe.at
115 +# Process this file with autom4te to create testsuite. -*- Autotest -*-
117 +# Test suite for GNU tar.
118 +# Copyright (C) 2010 Free Software Foundation, Inc.
120 +# This program is free software; you can redistribute it and/or modify
121 +# it under the terms of the GNU General Public License as published by
122 +# the Free Software Foundation; either version 3, or (at your option)
123 +# any later version.
125 +# This program is distributed in the hope that it will be useful,
126 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
127 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
128 +# GNU General Public License for more details.
130 +# You should have received a copy of the GNU General Public License
131 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
133 +AT_SETUP([sigpipe handling])
134 +AT_KEYWORDS([sigpipe])
136 +# Description: Tar 1.23 ignored sigpipe which lead to spurious "write
137 +# error" diagnostics when piping output to another programs.
138 +# Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
139 +# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html
140 +# <20100319184141.GC30047@wo.int.altlinux.org>
143 +genfile --length 2048 --file first
144 +genfile --length 2048 --file second
145 +genfile --length 2049 --file third
147 +tar cf archive first second third
154 diff --git a/tests/testsuite.at b/tests/testsuite.at
155 index 3e75ed8..9205d52 100644
156 --- a/tests/testsuite.at
157 +++ b/tests/testsuite.at
158 @@ -231,6 +231,8 @@ m4_include([remfiles01.at])
159 m4_include([remfiles02.at])
160 m4_include([remfiles03.at])
162 +m4_include([sigpipe.at])
164 m4_include([star/gtarfail.at])
165 m4_include([star/gtarfail2.at])
167 commit 40dea1ae7fc892a54eae2efd30ddd8559c697525
168 Author: Sergey Poznyakoff <gray@gnu.org.ua>
169 Date: Sat Mar 27 22:24:19 2010 +0200
173 * src/names.c (collect_and_sort_names): Remove
174 entry from the table before freeing it.
176 diff --git a/src/names.c b/src/names.c
177 index 2beaf3e..a3c6f58 100644
180 @@ -986,6 +986,7 @@ collect_and_sort_names (void)
183 rebase_child_list (p->child, name);
184 + hash_delete (nametab, name);
185 /* FIXME: remove_directory (p->caname); ? */