On 09/03/11 20:07, Kevin Brott wrote:
> Next?
Thanks for checking so far. Next would be test 38. One way
to investigate that would be to put the following shell script
into a file "test-scarce", and then running the shell command
"truss -f -o tr sh test-scarce". Please arrange to have
the two "tar" invocations be the most-recent "tar"
that you built.
#!/bin/sh
mkdir gnu || exit
cd gnu || exit
TEST_TAR_FORMAT=gnu
export TEST_TAR_FORMAT
TAR_OPTIONS="-H gnu"
export TAR_OPTIONS
exec </dev/null
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
# Tar should work when there are few, but enough, file descriptors.
( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
ulimit -n 10 &&
tar -cf archive3.tar a &&
tar -xf archive3.tar -C dest3 a
) &&
diff -r a dest3/a >/dev/null 2>&1
) || { diff -r a dest3/a; exit 1; }