[LTP] [PATCH] cpio_tests.sh: Fix failure with BusyBox cpio

Zhu Feiyu
2021-01-20T07:19:22Z

Hi Petr
> Hi Radoslav,
>
> ...
>>> +
>>> +if cpio 2>&1 | grep -q '\-o\sCreate (requires -H newc)'; then
> Thanks for your fix, merged with these changes:
>
> * grep for BusyBox because some older versions does not contain the
> hint, but actually require it.
>
> * move things to setup function due my following commit, which cannot be
> outside API functions (setup/test function):
> And check for -o (which is on BusyBox optional).
On my test environment, just executing cpio with no arguments will only
output:
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.

So the result of cpio01_sh is changed from PASS to CONF after commit
5910bdb65c.
Is there any difference in the output from executing this command on
your environment?

Best Regards
Feiyu Zhu
>
> Kind regards,
> Petr
>