[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] [GNU tar 1.20] testsuite: 2 7 8 13 14 16 17 22 28 29 44 45
From: |
H.Merijn Brand |
Subject: |
Re: [Bug-tar] [GNU tar 1.20] testsuite: 2 7 8 13 14 16 17 22 28 29 44 45 46 48 51 52 61 63 64 65 67 68 69 70 71 72 73 74 failed |
Date: |
Wed, 21 May 2008 14:53:02 +0200 |
On Wed, 21 May 2008 06:36:18 -0600, Eric Blake <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> [adding bug-gnulib]
>
> According to H.Merijn Brand on 5/21/2008 2:06 AM:
>
> [on HP-UX 10.20...]
>
> |
> | So, all these files have a leading two NULL bytes, but only when there
> | is a size (any size).
> |
> | d3:/pro/3gl/GNU/tar-1.20/tests 124 > genfile --length 0 --file
> directory/file2
> | d3:/pro/3gl/GNU/tar-1.20/tests 125 > dump directory/file2
> [DUMP 0.5.05 UX]
> |
> | 00000000
> |
> | In order to track the source, I added a debug print with a ftell ()
> | call in fill () to test the file offset before the write:
> |
> | So the problem lies before that, in generate_simple_file ()
> | --8<---
> | fprintf (stderr, "File opened 0x%x, off: %d\n", fp, ftell (fp));
> | if (fseeko (fp, seek_offset, 0))
> | error (EXIT_FAILURE, errno, "%s", _("cannot seek"));
> | fprintf (stderr, "File seeked, off: %d\n", ftell (fp));
> |
> | fill (fp, file_length, pattern);
> | -->8---
> |
> |
> | So obviously fseeko () (and.or fseek ()) are severely borked when
> | called as first call after fopen (), even if seek_offset == 0.
>
> Are you using the gnulib replacement for fseek/fseeko, or the native one?
Native
> ~ If this is a bug in the gnulib replacement, it might be nice to figure
> out why the seek is borking the file position.
>
> |
> | An extra guard to prevent this unwanted call:
> | --8<---
> | if (seek_offset && fseek (fp, (long)seek_offset, 0))
> | error (EXIT_FAILURE, errno, "%s", _("cannot seek"));
> | -->8---
>
> This shouldn't be necessary with a compliant fseek (or working gnulib
> fseek replacement).
Indeed it shouldn't be needed, but it prevents hitting the bug on HP-UX
10.20, a bug that won't be fixed. The chances that anyone will port GNU
libc to HP-UX 10.20 *AND* make the systems that could want it install
it are close to 0. (I won't do it, and I don't think theere is anyone
else still making Open Source publicly available for HP-UX 10.20).
BTW Download statistics prove that it is still very much required, as
the provided packages are still fetched.
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.10.x on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin. http://qa.perl.org
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org
http://www.goldmark.org/jeff/stupid-disclaimers/