From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by sourceware.org (Postfix) with ESMTPS id 05CD03857C49 for ; Wed, 27 Apr 2022 15:02:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 05CD03857C49 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-2ebf4b91212so21955257b3.8 for ; Wed, 27 Apr 2022 08:02:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Kf3BOrM/i8hnUZpo0bplIcxiFq8z9vt6El9eCML11Z8=; b=cFKP++BNCWEHSgEQCcEGm+iILYk2tWNl9sX6U73g7p1euXvyaDIG2HNt9xNjGQUbjK AzNq/qUAl1CDhUKdxRJQbdBn2y11Phs2tc8SSmDg2X0SIWh/v1R5ZS59um8+TIR3fj3w 3JWUzjNlivTPyjbvI92uSWT86KSWE8dfXJbxM0wRmqBvZzS3G1djGjbF4fGV9sGdSExV T0h6Qu/eSHr+QqNpRBQG7GVDXDy7aP7b+5iFZ1jn/b8M8EenXHDSW/TPtGd/ZcFwbTXj i0XujiIZo7MFrWwKMtRgevY3JNce0lFZEctmMgUQAUr2bC0lMImgKKmbP3bkpAISgF70 MpPA== X-Gm-Message-State: AOAM533frqsBd6mOfbfBC1GAwoXdlCapGAzfdZT2hgxOlk3Tvh6qt2Ir AcDuvg46Apb8nLSaOGnusC8iGpJZnyTZ8/BKzIQ= X-Google-Smtp-Source: ABdhPJwOIIk/H7+zql/rfAZrcX3oxeKaVVsMf6Wzm0GcWAsERRrOS+KtTCo78/6+wLPLz6us0cL0VMt0JQoLIxG7S7w= X-Received: by 2002:a0d:dd90:0:b0:2f8:5459:486e with SMTP id g138-20020a0ddd90000000b002f85459486emr1379070ywe.427.1651071759401; Wed, 27 Apr 2022 08:02:39 -0700 (PDT) MIME-Version: 1.0 References: <20220414041231.926415-1-goldstein.w.n@gmail.com> <20220414145540.194794-1-goldstein.w.n@gmail.com> <20220414145540.194794-3-goldstein.w.n@gmail.com> <87ee1lnpfe.fsf@oldenburg.str.redhat.com> <87pml4kzrk.fsf@oldenburg.str.redhat.com> <87a6c6iyyx.fsf@oldenburg.str.redhat.com> In-Reply-To: <87a6c6iyyx.fsf@oldenburg.str.redhat.com> From: Noah Goldstein Date: Wed, 27 Apr 2022 10:02:28 -0500 Message-ID: Subject: Re: [PATCH v2 3/6] nss: Add tests for the nss_hash in nss_hash.h To: Florian Weimer Cc: Noah Goldstein via Libc-alpha Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2022 15:02:50 -0000 On Wed, Apr 27, 2022 at 5:48 AM Florian Weimer wrote: > > * Noah Goldstein: > > > On Tue, Apr 26, 2022 at 3:36 AM Florian Weimer wrote: > >> > >> * Noah Goldstein: > >> > >> > On Mon, Apr 25, 2022 at 10:38 AM Florian Weimer wrote: > >> >> > >> >> * Noah Goldstein via Libc-alpha: > >> >> > >> >> > +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) (%lu), %x != %x\n", fill, len, expec, res); > >> >> > + return 1; > >> >> > + } > >> >> > + > >> >> > + return 0; > >> >> > +} > >> >> > >> >> %lu needs to be %zu, otherwise this fails to build on various > >> >> architectures. > >> > > >> > Fixed in v3. > >> > >> Thanks; I can confirm the new version builds fine. > >> > >> Florian > > > > Thanks, good to push? > > You said you wanted to post a v4, I think? Recent v3 like a doofus, will mix your nits as well as Adhemerval's in V4. > > Anyway, I commented on a few nits. > > Thanks, > Florian >