[BusyBox] tar - test script and patch problem!

Jim Gleason jimg at lineo.com
Tue Nov 28 18:31:35 UTC 2000


kent robotti wrote:

>    [BusyBox] busybox tar - test script & patch for handling of hard links...
>
>    Jim Gleason jimg at lineo.com
>    Tue, 28 Nov 2000 08:16:35 -0700
>
> Hey all, attached are two files dealing with busybox tar.  I have sent
> these before but no one has indicated they have tested them or even
> care.  Would someone mind having a look.
>
> tar_tests.bash -> A test script that thouroughly test tar (busybox VS
> GNU).  This would go in the tests sub-directory.
>
> tar.c.hardlink.patch -> A patch that fixes the busybox tar utility to
> correctly handle hard links.
> This patch was made for tar.c revision number 1.70 and tar.c is now up
> to 1.72, but the patch should still work.
>
> I tryed the tar patch and test with the latest cvs bb.
>
> The test script had this problem.
>
> # tar_tests.bash
> tar_test_1: full creation and full extraction
> it hangs!
>
>         if [ "${CREATE_NORMAL}" = "Yes" ]; then
>                 ${Gtar} -cf ${TMPDIR}/G.normal.tar ${TESTDIR}
>
>         I think it hangs after it creates B.normal.tar!
>
>                 ${Btar} -cf ${TMPDIR}/B.normal.tar ${TESTDIR}
>         fi
>
> It never gets this far in the script!
>
> B.normal.tar in tar.tmp.dir seems to be complete
> and have the same contents as G.normal.tar!
>
> Something like this doesn't work with the bb tar, you
> can't have it match a wildcard like the gnu tar can do.
>
>             tar -xO *fooboo
>
> Maybe you can enable this in the bb tar.
>
> _______________________________________________
> busybox mailing list
> busybox at opensource.lineo.com
> http://opensource.lineo.com/mailman/listinfo/busybox

I already knew about the wildcard extraction problem within busybox tar.  My
test showed me these (see my test run results below).  However, I don't
understand why the test script was hanging on you.  If you can better identify
what is happening, I would greatly appreciate it  (what GNU tar version are you
using, ps results, ...).

Jim

<<< Test run results given current BB from CVS with tar hard link patch >>>
[jimg at frik tests]$ ./tar_tests.bash
Removing tar test files and directories
Creating tar test files and directories
tar_test_1: Full Creation & Full Extraction
        <WARNING> File sizes differ (GNU VS BB)
        <OK> tar_test_1
tar_test_2: Full Creation & Partial Extraction
        <WARNING> File sizes differ (GNU VS BB)
        <OK> tar_test_2
tar_test_3: Partial Creation & Full Extraction
        <WARNING> File sizes differ (GNU VS BB)
        <OK> tar_test_3
tar_test_4: Partial Creation & Partial Extraction
        <WARNING> File sizes differ (GNU VS BB)
        <OK> tar_test_4
tar_test_5: Full Creation & Wildcard Extraction
        <WARNING> File sizes differ (GNU VS BB)
diff: tar.test.dir/one: No such file or directory
ls: tar.test.dir/one: No such file or directory
        <FAIL> BB tar extraction of GNU tar creation (Wildcarded '*') (ls)
(extracted VS ls of original)
diff: tar.test.dir/one: No such file or directory
ls: tar.test.dir/one: No such file or directory
        <FAIL> BB tar extraction of BB tar creation (Wildcarded '*') (ls)
(extracted VS ls of original)
diff: tar.test.dir/one: No such file or directory
ls: tar.test.dir/one: No such file or directory
        <FAIL> BB tar extraction of GNU tar creation (Wildcarded '?') (ls)
(extracted VS ls of original)
diff: tar.test.dir/one: No such file or directory
ls: tar.test.dir/one: No such file or directory
        <FAIL> BB tar extraction of BB tar creation (Wildcarded '?') (ls)
(extracted VS ls of original)
diff: tar.test.dir/one: No such file or directory
ls: tar.test.dir/one: No such file or directory
        <FAIL> BB tar extraction of GNU tar creation (Wildcarded '[]') (ls)
(extracted VS ls of original)
diff: tar.test.dir/one: No such file or directory
ls: tar.test.dir/one: No such file or directory
        <FAIL> BB tar extraction of BB tar creation (Wildcarded '[]') (ls)
(extracted VS ls of original)
        <FAIL> tar_test_5
Removing tar test files and directories
[jimg at frik tests]$



More information about the busybox mailing list