On Wednesday 27 May 2009 11:53, Maxin John wrote:
> Hi,
> 
> >During the busybox-1.13.4 test, I have observed that the 
> >testsuite/cpio.tests contains a test which uses the '-H' option of cpio:
> >
> >"find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i); 
> >echo \$?;
> >
> >However, the '-H' option is not present in the busybox version of cpio.

Many tests assume full-blown ("allyesconfig") busybox.

With FEATURE_CPIO_O on, cpio will have -H:

#if !ENABLE_FEATURE_CPIO_O
        opt = getopt32(argv, OPTION_STR, &cpio_filename);
#else
        opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), 
&cpio_filename, &cpio_fmt);
                                          ^^ HERE

> >-bash-3.2# cpio -H
> >cpio: invalid option -- 'H'

Most likely you have FEATURE_CPIO_O off

> I have re-tested the busybox-1.13.4 after making the below listed changes:
>  
> 1. enabled 'CONFIG_FEATURE_CPIO_O=y' in busybox .config file.
> 2. Patched 'cpio.tests' file using the below listed patch 
> 
> After that, 'cpio extracts zero-sized hardlinks' test passed:
> "PASS: cpio extracts zero-sized hardlinks 2"
> 
> Patch for 'cpio.tests' file 
> ----------------------
> 
> --- /tmp/cpio.tests        2008-11-09 17:28:19.000000000 +0000
> +++ cpio.tests  2009-05-27 09:13:46.000000000 +0000
> @@ -68,6 +68,7 @@
>  "find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i); 
> echo \$?;
>  ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \
>  "\
> +2 blocks
>  0
>  -rw-r--r-- 2 $user $group 0 empty
>  -rw-r--r-- 2 $user $group 0 empty1

Applied, thanks.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to