>> Solaris 10 IA-32 c99 (Sun C 5.10 SunOS_i386 Patch >> 142363-05 2010/04/28) >> >> 106: remove-files with compression FAILED >> (remfiles01.at:32) > > I reproduced this problem on Solaris 8. It is a timing problem > with signals; sometimes it happens, sometimes it doesn't. I don't > think the choice of compiler matters. I'll take a look at it.
I took a look at it, and found a fix that worked for me. I pushed the following patch, which also fixes two other porting bugs I discovered on Solaris 8. Thanks again for reporting that bug. All these fixes are to the tar test suite, and not to tar itself. >From 4b30226188f6dc1e3f962a7d635e8f7f7de4dc61 Mon Sep 17 00:00:00 2001 From: Paul Eggert <[email protected]> Date: Tue, 2 Nov 2010 01:04:33 -0700 Subject: [PATCH] tests: fix some issues with signals, timestamps, "test" typo * tests/extrac17.at: Add --warning=no-timestamp, to avoid bogus warning due to NFS clock skew. * tests/remfiles01.at: Discard diagnostics that some shells generate about broken pipes. * tests/sigpipe.at: Likewise. * tests/remfiles01.at: Fix typo: "test $EC" was written where "test $EC -ne 0" was intended. --- tests/extrac17.at | 7 ++----- tests/remfiles01.at | 10 ++++++---- tests/sigpipe.at | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/extrac17.at b/tests/extrac17.at index 952c073..779af48 100644 --- a/tests/extrac17.at +++ b/tests/extrac17.at @@ -36,14 +36,11 @@ genfile --file dir/subdir2/file2 tar cf dir.tar dir -tar -x -v -f dir.tar -C out --strip-components=2 dir/subdir1/ +tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \ + dir/subdir1/ ], [0], [dir/subdir1/file1 ]) AT_CLEANUP - - - - diff --git a/tests/remfiles01.at b/tests/remfiles01.at index 86b5c03..6212efb 100644 --- a/tests/remfiles01.at +++ b/tests/remfiles01.at @@ -47,14 +47,16 @@ mkdir c # or # tar: Child returned status 2 -tar -c -f a -z --remove-files b c 2>err +# Discard diagnostics that some shells generate about broken pipes, +# and discard all of tar's diagnostics except for the ones saying "(child)". +# Gzip's exit code is propagated to the shell. Usually it is 141. +# Convert all non-zero exits to 2 to make it predictable. +(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null EC=$? sed -n '/(child)/p' err >&2 rm err find . | sort -# Gzip exit code is propagated to the shell. Usually it is -# 141. We convert all non-zero exits to 2 to make it predictable. -test $EC && exit 2 +exit $EC ], [2], [. diff --git a/tests/sigpipe.at b/tests/sigpipe.at index 9edca77..4a3282b 100644 --- a/tests/sigpipe.at +++ b/tests/sigpipe.at @@ -32,7 +32,8 @@ 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]) -- 1.7.2
