[Toybox] tar tests.

Rob Landley rob at landley.net
Thu Mar 14 11:00:07 PDT 2019


On 3/14/19 12:08 AM, enh wrote:
> On Wed, Mar 13, 2019 at 4:05 PM Rob Landley <rob at landley.net> wrote:
>
> ((speaking of which, some of the tar tests are failing now.))

I usually consider "consumes its own output" to be "necessary but not
sufficient" as tests go: if it makes the same mistake at each end, we won't
catch it. So during development I've been testing that it can extract and
reproduce the linux-4.20.tar.gz tarball.

What I _need_ to do is make a tarball with file, dir, symlink, hardlink, fifo,
block and char devices, with both short and long names. And that requires root
access. (As does checking ownership is preserved.)

Speaking of which: busybox tar doesn't set ownership when extracting broken
symlinks. Sigh. And the pending/ tar doesn't preserve timestamps on directories
(it sets them, and then descends into them to create files, changing the
timestamp to "now" because it's modifying it)...

That said, yeah it's failing tar.tests, need to fix that.

(What I _really_ need is to find an example of this "posix extended header" with
the path= field. None of the tarballs I have lying around seem to do that, they
have longlnk instead. I should rustle through my old source tarballs and see
what's there. I mean, I can _fake_ one, but again what have I proved?)

Rob

P.S. This ../ parsing is silly, I plan to get the absolute path and see if it's
under cwd. That may be slow but it should _work_. I'm not gonna try to
micromanage "create blah -> /etc", "extract blah/passwd" by trying to find every
case that might go weird.


More information about the Toybox mailing list