regarding busybox 1.13.4 - tar_with_link_with_size test failure
Denys Vlasenko
vda.linux at googlemail.com
Thu Jun 18 20:43:15 UTC 2009
On Thursday 28 May 2009 11:11, Maxin John wrote:
> Hi,
>
> During busybox 1.13.4 testing, I have observed that the "testsuite/tar/tar_with_link_with_size" test fails.
> Test Result: "FAIL: tar_with_link_with_size"
>
> I have analyzed this failure and found that this is due to the mismatch between expected and the actual output:
> expected output:
> "
> res1="\
> lrwxrwxrwx user/group 0 2008-07-19 15:02:37 firmware-372/sources/native/bin/chroot-setup.sh -> qemu-setup.sh
> -rwxr-xr-x user/group 512 2008-07-19 15:02:37 firmware-372/sources/native/bin/qemu-setup.sh"
> "
>
> actual output(currently running as root):
> "
> res1="\
> lrwxrwxrwx 0/0 0 2008-07-19 15:02:37 firmware-372/sources/native/bin/chroot-setup.sh -> qemu-setup.sh
> -rwxr-xr-x 0/0 512 2008-07-19 15:02:37 firmware-372/sources/native/bin/qemu-setup.sh"
> "
>
> Based on this observation, I have generalized the expected output and created a patch for this test case. After applying the below listed patch, this test passes.
> Test Result: "PASS: tar_with_link_with_size"
>
> Please let me know your opinion on this patch.
Unfortunately it is wrong. "user" and "group" names are hardcoded
inside sample tarball:
# hexdump -vC z.tar
00000000 66 69 72 6d 77 61 72 65 2d 33 37 32 2f 73 6f 75 |firmware-372/sou|
00000010 72 63 65 73 2f 6e 61 74 69 76 65 2f 62 69 6e 2f |rces/native/bin/|
00000020 63 68 72 6f 6f 74 2d 73 65 74 75 70 2e 73 68 00 |chroot-setup.sh.|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 00 00 00 00 30 30 30 30 37 37 37 00 30 30 30 30 |....0000777.0000|
00000070 30 30 30 00 30 30 30 30 30 30 30 00 30 30 30 30 |000.0000000.0000|
00000080 30 30 30 30 30 31 35 00 31 31 30 34 30 33 36 32 |0000015.11040362|
00000090 37 35 35 00 30 32 34 35 32 35 00 20 32 71 65 6d |755.024525. 2qem|
000000a0 75 2d 73 65 74 75 70 2e 73 68 00 00 00 00 00 00 |u-setup.sh......|
000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000100 00 75 73 74 61 72 00 30 30 75 73 65 72 00 00 00 |.ustar.00user...|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000120 00 00 00 00 00 00 00 00 00 67 72 6f 75 70 00 00 |.........group..|
and you are assuming they match current user:
> +user=`id -u`
> +group=`id -g`
> res1="\
> -lrwxrwxrwx user/group 0 2008-07-19 15:02:37 firmware-372/sources/native/bin/chroot-setup.sh -> qemu-setup.sh
> --rwxr-xr-x user/group 512 2008-07-19 15:02:37 firmware-372/sources/native/bin/qemu-setup.sh"
> +lrwxrwxrwx $user/$group 0 2008-07-19 15:02:37 firmware-372/sources/native/bin/chroot-setup.sh -> qemu-setup.sh
> +-rwxr-xr-x $user/$group 512 2008-07-19 15:02:37 firmware-372/sources/native/bin/qemu-setup.sh"
> export TZ=UTC-2
I think you just need to set CONFIG_FEATURE_TAR_UNAME_GNAME=y instead...
--
vda
More information about the busybox
mailing list