bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] tar 1.24: OpenBSD testsuite failures


From: Christian Weisgerber
Subject: [Bug-tar] tar 1.24: OpenBSD testsuite failures
Date: Tue, 26 Oct 2010 11:39:16 +0200
User-agent: Mutt/1.4.2.3i

Running the GNU tar 1.24 testsuite ("make check") on OpenBSD, I get
three failures:

34: extrac09.at:22   no need to save dir with unreadable . and ..
36: extrac11.at:23   scarce file descriptors
53: listed03.at:22   incremental dump when the parent directory is unreadable

#34 and #53 fail because on OpenBSD, getcwd(3) and the underlying
__getcwd() system call give an EACCES error when the parent directory
is unreadable.

#36 runs out of file descriptors for some reason.  (ulimit -n 13 is
the minimum required for the test to complete successfully.)


Here are the interesting snippets of testsuite.log; I didn't want to
include the whole 1.6 MB.

## ---------------------- ##
## Detailed failed tests. ##
## ---------------------- ##

#                             -*- compilation -*-
34. extrac09.at:22: testing ...
./extrac09.at:25:
mkdir gnu
(cd gnu
TEST_TAR_FORMAT=gnu
export TEST_TAR_FORMAT
TAR_OPTIONS="-H gnu"
export TAR_OPTIONS
rm -rf *


echo test > 25656
chmod 0 25656
cat 25656 > /dev/null 2>&1
result=0
rm -f 25656
test  -eq 0 && exit 77


mkdir dir
mkdir dir/sub
mkdir dir/sub/extract
genfile --file dir/sub/f
cd dir/sub

tar -cf archive.tar f

chmod a-r . ..
tar -xvf archive.tar -C extract f
status=$?
chmod a+r . ..
cmp f extract/f || status=$?
exit $status
)
Not enabling shell tracing (command contains an embedded newline)
--- /dev/null   Tue Oct 26 11:13:30 2010
+++ /usr/ports/pobj/gtar-1.24/tar-1.24/tests/testsuite.dir/at-groups/34/stderr  
Tue Oct 26 11:13:30 2010
@@ -0,0 +1,2 @@
+tar: unable to record current working directory: Permission denied
+cmp: extract/f: No such file or directory
./extrac09.at:25: exit code was 2, expected 0
34. extrac09.at:22: 34. no need to save dir with unreadable . and .. 
(extrac09.at:22): FAILED (extrac09.at:25)

#                             -*- compilation -*-
36. extrac11.at:23: testing ...
./extrac11.at:26:
mkdir gnu
(cd gnu
TEST_TAR_FORMAT=gnu
export TEST_TAR_FORMAT
TAR_OPTIONS="-H gnu"
export TAR_OPTIONS
rm -rf *

dirs='a
      a/b
      a/b/c
      a/b/c/d
      a/b/c/d/e
      a/b/c/d/e/f
      a/b/c/d/e/f/g
      a/b/c/d/e/f/g/h
      a/b/c/d/e/f/g/h/i
      a/b/c/d/e/f/g/h/i/j
      a/b/c/d/e/f/g/h/i/j/k
'
files=
mkdir $dirs dest1 dest2 dest3 || exit
for dir in $dirs; do
  for file in X Y Z; do
    echo $file >$dir/$file || exit
    files="$files $file"
  done
done

# Check that "ulimit" itself works.
((ulimit -n 100 &&
  tar -cf archive1.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
  tar -xf archive1.tar -C dest1 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
 ) &&
 diff -r a dest1/a
) >/dev/null 2>&1 ||
   exit 77

# Another test that "ulimit" itself works:
# tar should fail when completely starved of file descriptors.
((ulimit -n 4 &&
  tar -cf archive2.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
  tar -xf archive2.tar -C dest2 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
 ) &&
 diff -r a dest2/a
) >/dev/null 2>&1 &&
   exit 77

# Tar should work when there are few, but enough, file descriptors.
((ulimit -n 10 &&
  tar -cf archive3.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
  tar -xf archive3.tar -C dest3 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
 ) &&
 diff -r a dest3/a >/dev/null 2>&1
) || { diff -r a dest3/a; exit 1; }
)
Not enabling shell tracing (command contains an embedded newline)
--- /dev/null   Tue Oct 26 11:13:30 2010
+++ /usr/ports/pobj/gtar-1.24/tar-1.24/tests/testsuite.dir/at-groups/36/stderr  
Tue Oct 26 11:13:30 2010
@@ -0,0 +1,2 @@
+./testsuite: 
/usr/ports/pobj/gtar-1.24/tar-1.24/tests/testsuite.dir/at-groups/36/test-source[209]:
 too many files open in shell
+diff: dest3/a: No such file or directory
./extrac11.at:26: exit code was 1, expected 0
36. extrac11.at:23: 36. scarce file descriptors (extrac11.at:23): FAILED 
(extrac11.at:26)

#                             -*- compilation -*-
53. listed03.at:22: testing ...
./listed03.at:25:
mkdir gnu
(cd gnu
TEST_TAR_FORMAT=gnu
export TEST_TAR_FORMAT
TAR_OPTIONS="-H gnu"
export TAR_OPTIONS
rm -rf *


echo test > 25656
chmod 0 25656
cat 25656 > /dev/null 2>&1
result=0
rm -f 25656
test  -eq 0 && exit 77


mkdir dir
mkdir dir/sub
mkdir dir/sub/a
genfile --file dir/sub/a/file
cd dir/sub

chmod a-r ..
tar -c -f archive.tar --listed-incremental=db.1 -v a
status=$?
chmod a+r ..
exit $status
)
Not enabling shell tracing (command contains an embedded newline)
--- -   Tue Oct 26 11:14:29 2010
+++ /usr/ports/pobj/gtar-1.24/tar-1.24/tests/testsuite.dir/at-groups/53/stderr  
Tue Oct 26 11:14:29 2010
@@ -1,2 +1,5 @@
+tar: Cannot get working directory: Permission denied
 tar: a: Directory is new
+tar: Cannot get working directory: Permission denied
+tar: Cannot get working directory: Permission denied
 
53. listed03.at:22: 53. incremental dump when the parent directory is 
unreadable (listed03.at:22): FAILED (listed03.at:25)


-- 
Christian "naddy" Weisgerber                          address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]