[PATCH v3 3/6] nss: Add tests for the nss_hash in nss_hash.h

Noah Goldstein goldstein.w.n@gmail.com
Wed Apr 27 16:24:16 GMT 2022


On Wed, Apr 27, 2022 at 5:39 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Noah Goldstein via Libc-alpha:
>
> > diff --git a/nss/Makefile b/nss/Makefile
> > index d8b06b44fb..a978e3927a 100644
>
> > +static int
> > +do_fill_tests (size_t len, int fill)
> > +{
> > +  uint32_t expec, res;
> > +  char buf[len];
> > +  memset (buf, fill, len);
> > +
> > +  expec = simple_nss_hash (buf, len);
> > +  res = __nss_hash (buf, len);
> > +  if (expec != res)
> > +    {
> > +      printf ("FAIL: fill(%d) (%zu), %x != %x\n", fill, len, expec, res);
> > +      return 1;
>
> You could use FAIL_EXIT1 here.

Fixed in V4.
>
> Thanks,
> Florian
>


More information about the Libc-alpha mailing list