bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] tar 1.24: OpenBSD testsuite failures


From: Christian Weisgerber
Subject: Re: [Bug-tar] tar 1.24: OpenBSD testsuite failures
Date: Wed, 27 Oct 2010 14:35:01 +0200
User-agent: Mutt/1.4.2.3i

Paul Eggert:

> The relevant shell source code (in testsuite) is:
> 
> # 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; }
> )"

Yes.  And I've set up the test directories manually and run the
above from the command line--where it works fine for a limit of 8
or more descriptors.

It only fails when called from the testsuite.

It succeeds from the testuite with -n 13 or more.

Very strange.

> For example, what does the following little shell script do on
> your host?
> 
> #! /bin/sh
> if (ulimit -n 10 && true 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-) </dev/null 
> >/dev/null 2>&1
> then echo OK
> else echo buggy shell
> fi

It says OK.

> Or perhaps you can come up with a simple variant of the above test
> that will do the trick (maybe replace "true" with "cat /dev/null"?).

Also says OK.

> In reviewing the test, I see another possible portability problem, and
> I pushed the following patch.  I doubt whether this will fix your
> issue, though.

No, it doesn't, same result.

> --- a/tests/extrac11.at
> +++ b/tests/extrac11.at
> @@ -24,6 +24,7 @@ AT_SETUP([scarce file descriptors])
>  AT_KEYWORDS([extract extrac11])
>  
>  AT_TAR_CHECK([
> +exec </dev/null
>  dirs='a
>        a/b
>        a/b/c

-- 
Christian "naddy" Weisgerber                          address@hidden



reply via email to

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