From nobody Mon Jul 29 20:47:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXr5z0JBtz5Ry4G; Mon, 29 Jul 2024 20:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXr5y4yB8z4m5G; Mon, 29 Jul 2024 20:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722286070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djADO+GgdZIquB3sDZ37qPbwOoMXyRF9CxvkY7dA5QQ=; b=RhSTMhmUkyHX6DK73ZVc+S9m+K0kxzh+CmkLMiYMkHpVYelCiDNJm9yR5HByzSaUHLqPsR ItKcOqG/j96XqaPcElbnOGZloslW1rkrNWV8G3+X6Wf2D0TSqULGrbaoBEioyPu/Z9WjUK hDp7z/cXZQ2NDkd/DRTAOAp+dAEfckD1+cah/VuriV4HSgx75uKBBHjSgwE6YM850CjsLo Wf/7AmkkVVDVTahC0rD2xPcSv5G6Zgff8h6H6Snai7r7rB9sJvlcoHk5TjHyIvYuuO58X5 pZhVT199Zvb0tIq8BWw0QeorDJuPIsFWpfyx6FKMl6r4e/OMSCD0fGU7Ty91qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722286070; a=rsa-sha256; cv=none; b=TXN0jiVSxdtyoNJwmk1WarhJ1eOgQLC0DYVstB4ceev4xYlEQ0HkYmUpHLkKlMjP7yExbj mHT1Qcoo5rBBNN9sJHBZcFMuepRzvjr8hN65J1o8JJYeWOzjInD9ufwo/L3p0NO0+XuqOQ G6WKpADY615IEwlwpgRiTEqBsUqLKiljCq+jXu8WpA6PdEUZbVvCebt7Nv8/T8tnuu1Kuy RXggtTEATGUOzMyMs3i9jtuqWO9t16kZ6TB9ha8+UPzwjJJb/QYcRRoIZ4Mf5by8StOpe+ QgJATf7tjuWxlfcZ0Xn/sH9J699ylFckY+qF1Nd1N1BMCkSh2REjaLf2r1fSMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722286070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djADO+GgdZIquB3sDZ37qPbwOoMXyRF9CxvkY7dA5QQ=; b=sUsnRlrdbgr46HPr2OKWsKbD/CTe7XsylH3mUS8qGAOXFR17BXSGpkPePsVSVrf5cKXvgX 9gb9NxCg3/hUa9e1T/pB/rEePSgyFbKHUw4iul8r2ShkPj8AFJzFzK0AG10hkLvr/fMYKt ecdSxBlFZY3nD7VP8VocTLpXAKJc1LLIk31oLgsXLxAyyUC47daJ2Yuufa2KA/jNaNk+3/ KaJ6y8u3MGbirPkmNbvXbKiC+VqqvJaPLM0C2IO8rrjgNuhUXnggzacicROBj24NxJmJeL YRGwCRITy1ha9vjsgC3yAYjZgaOyuLGXGwTIrVBPhNM+rMSv37pfl0RYV6YGZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WXr5y4Nzyzpdd; Mon, 29 Jul 2024 20:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKloEs030153; Mon, 29 Jul 2024 20:47:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKloHo030150; Mon, 29 Jul 2024 20:47:50 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:47:50 GMT Message-Id: <202407292047.46TKloHo030150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e40474f3de84 - main - siphash: minor improvements to siphash unit test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e40474f3de84f3c7b885af45d9a9391c6cf448c2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e40474f3de84f3c7b885af45d9a9391c6cf448c2 commit e40474f3de84f3c7b885af45d9a9391c6cf448c2 Author: Mark O'Donovan AuthorDate: 2024-07-11 17:50:48 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:44:41 +0000 siphash: minor improvements to siphash unit test Signed-off-by: Mark O'Donovan Reviewed by: imp, cperciva Pull Request: https://github.com/freebsd/freebsd-src/pull/1324 --- sys/crypto/siphash/siphash_test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/crypto/siphash/siphash_test.c b/sys/crypto/siphash/siphash_test.c index a9af5a5ebe58..a9f5bcf062bb 100644 --- a/sys/crypto/siphash/siphash_test.c +++ b/sys/crypto/siphash/siphash_test.c @@ -115,7 +115,7 @@ SipHash24_TestVectors(void) for (i = 0; i < 16; ++i) k[i] = i; - /* Step through differnet length. */ + /* Step through different lengths */ for (i = 0; i < MAXLEN; ++i) { in[i] = i; @@ -124,14 +124,14 @@ SipHash24_TestVectors(void) SipHash_Update(&ctx, in, i); SipHash_Final(out, &ctx); - if (memcmp(out, vectors[i], 8)) + if (memcmp(out, vectors[i], 8)) { + fail++; #if 0 printf("%i: test vector failed\n", i); - else + } else { printf("%i: test vector correct\n", i); -#else - fail++; #endif + } } return ((fail == 0));