[PATCH v4] string: Add tests for unique strerror and strsignal strings
Arjun Shankar
arjun@redhat.com
Tue Sep 23 12:11:01 GMT 2025
Hi Florian, Adhemerval,
> >> Maybe derive from errlist.h by extending scripts/gen-as-const.py to
> >> build a TU similar to stdio-common/errlist-data-gen.c?
> >
> > Ah, so basically look at
> >
> > echo '#include <linux/errno.h>'| gcc -E - -dM | grep '^#define E'
> >
> > and cross-check against the strerror functions?
>
> I think it can work, although I was think about using errlist.h to get the
> expected list built in libc.so.
I know that it sounds kind of implausible that we might make an
erroneous change to errlist.h in the future. However, keeping the
test's behaviour independent of the list can help guard against the
test silently passing when the list is somehow updated incorrectly.
Does this sound reasonable? I'm going to think about how I can make
the test better here, instead of this hardcoded 160.
Cheers,
Arjun
More information about the Libc-alpha
mailing list