[LTP] [RFC PATCH 6/9] testcases: wc: Add "unrecognized option" as TCONF
Mylène Josserand
mylene.josserand@bootlin.com
Tue Jun 5 08:21:48 CEST 2018
Hi Petr,
On Mon, 4 Jun 2018 17:22:21 +0200
Petr Vorel <pvorel@suse.cz> wrote:
> Hi Mylène,
>
> > > I haven't found it in busybox sources neither in busybox git log.
>
> > Just in case, this is what I get with my busybox (v1.24.1):
>
> > # wc --max-line-length
> > wc: unrecognized option '--max-line-length'
> > BusyBox v1.24.1 (2018-02-10 17:35:25 CET) multi-call binary.
>
> > Usage: wc [-clwL] [FILE]...
>
> > I looked very quickly and it seems to be glibc with "getopt" function
> > that prints this error:
> > https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/getopt.c#l309
>
> Thanks for debugging. Indeed, it really uses getopts() from libc, thus
> libc dependent - busybox with musl has it with comma:
> wc: unrecognized option: max-line-length
>
> But all libraries common libc libraries (glibc, musl, uclibc-ng) has string "unrecognized
> option" => make sense to add the patch.
Oh yes, I did not check other C library, great to know that
"unrecognized option" is common.
Thanks for the review and for the pushed!
Best regards,
--
Mylène Josserand, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
More information about the ltp
mailing list