From patchwork Wed Dec 27 19:29:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 1880587 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=CrIK9OSk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T0hYP3mM7z1ydb for ; Thu, 28 Dec 2023 06:30:01 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 525283858C31 for ; Wed, 27 Dec 2023 19:29:59 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by sourceware.org (Postfix) with ESMTPS id AF6433858D38 for ; Wed, 27 Dec 2023 19:29:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF6433858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AF6433858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::f32 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703705385; cv=none; b=vYyAllo3a9oGCgh9OoqEETjjCxNtw2i7dda8GMCS0pQp4SEPf1xyfEFKvLzJvfLp2+dGNA+AFA5ZmcqpyBUBk5jtBaBIw5zax9u2C8M9aTu7rDbbk5+9MIgRojQ2/D8/SlA/lIBr5pBAN7cRjDUkD/4JuYCfOWLhkrQYm7PHwo4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703705385; c=relaxed/simple; bh=QfTLVxPVzBSCseLeynU8wnG78+uUVVuuCQVlaBY/Eto=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=OVat9spBz+RcKBed+2UmWoqNyiN0Zj0SKFNRdfwCN/pJEBDKEzubTnDHNC+C7i38f0nJ70vkgS6fO5e7XcwmBrvFHrE0lbpjJAJ7lElVtocaU+ew92q12eZ/pnyIyZM961HtA/uMbh73yO1WL0K1GqbqrwuSp3hArjdLuxj16K8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-67f9f6caabcso40413046d6.3 for ; Wed, 27 Dec 2023 11:29:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703705378; x=1704310178; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kp6ZFxavMyuVi9pKVcC6cPNfz8JU6W3fBlPx9u4R6Ls=; b=CrIK9OSk0hM4WqbkXoMtyWGPCK3FSYSBBeHUZyGzFjGGYCZMvqRtN5iASVz6StMZ4D BMePGQClw2TtK/UbK40ZifFSvdl0BgvLXebS6TnJ/XL2+zbyaPoX9Zi+1eC2J8d82N+J YS0hdwDHVpE6ZqYgv6IHniliVFcpX4jght0sj71cBxYhcDenevfvSq69vtaWrIZmyplJ OVJzoquwCFcx/7pi/WR15dNkrwiMOOwNxK0h0KUNzPMB34Rdn/hnXm9+j5pYtgIAJ2CQ stUiAlH0U4CPe5TgwdNU3xN1ocVvwWnxrnLuXWlqPYp1aIlSdazu1PnRJWCF5/lKl5Pa KzSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703705378; x=1704310178; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kp6ZFxavMyuVi9pKVcC6cPNfz8JU6W3fBlPx9u4R6Ls=; b=jVZJYv7gqzaUwfLEunnETV6ngP0Na8mjMEqJ4tz4BLBuBQvSEJhcq12F+KQvgswlhX 0+K4oPNAxQw1FUPb0eeZ1E4CKymQHcvb2iV/2He+QFgydeJvqY9ImZAOPrVWmc03UbWV auGn6veSPNjaj0p9DW845//jZ/W7C08xonDbSaL6QIjkabyTUVKnVqJqs0cfK6izuWBf Ro0wa8s42dLwic1T6t/ZPQ8Pzig/9xRiXY34QCnDl9PhITZkSWwXiHq9RUH0InFG+0zz ke6HFEizvo1zy2eP1QIZ86CJJsVGEU3fZr0yteH7BiHx+TUBnalUs0zRoVMhxsSjYy+O I7QQ== X-Gm-Message-State: AOJu0YwvE6d6H6k0ucs8gRfeReiZmfInu7lp9eSyG4hapjr3nAn1gNeD PfCIfb1br8RoYayLQZAg1hFNYKD8NG0= X-Google-Smtp-Source: AGHT+IGFZFTwPrWwHyQfivsLgaJehVkJ3EQLohOkYV2fmpuZOcHCvkagOzpB5Xs84dzHysSMf0xl8Q== X-Received: by 2002:a05:6214:2b52:b0:67f:b79d:6cd9 with SMTP id jy18-20020a0562142b5200b0067fb79d6cd9mr9420365qvb.73.1703705378432; Wed, 27 Dec 2023 11:29:38 -0800 (PST) Received: from noahgold-desk.intel.com ([192.55.54.51]) by smtp.gmail.com with ESMTPSA id w6-20020a0cef86000000b0067f77ca8d18sm5756595qvr.96.2023.12.27.11.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 11:29:37 -0800 (PST) From: Noah Goldstein To: libc-alpha@sourceware.org Cc: goldstein.w.n@gmail.com, hjl.tools@gmail.com, carlos@systemhalted.org Subject: string: Add additional output in test-strchr failure Date: Wed, 27 Dec 2023 11:29:32 -0800 Message-Id: <20231227192932.2375810-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Seeing occasional failures in `__strchrnul_evex512` that are not consistently reproducible. Hopefully by adding this the next failure will provide enough information to debug. --- string/test-strchr.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/string/test-strchr.c b/string/test-strchr.c index 933fc0bbba..e6bae76962 100644 --- a/string/test-strchr.c +++ b/string/test-strchr.c @@ -111,7 +111,7 @@ check_result (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res) CHAR *res = CALL (impl, s, c); if (res != exp_res) { - error (0, 0, "Wrong result in function %s %#x %p %p", impl->name, + error (0, 0, "Wrong result in function %s(%p) %#x %p %p", impl->name, s, c, res, exp_res); ret = 1; return -1; @@ -119,11 +119,10 @@ check_result (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res) return 0; } -static void +static int do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res) { - if (check_result (impl, s, c, exp_res) < 0) - return; + return check_result (impl, s, c, exp_res); } static void @@ -160,7 +159,15 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char) result = NULLRET (buf + align + len); FOR_EACH_IMPL (impl, 0) - do_one_test (impl, buf + align, seek_char, result); + { + if (do_one_test (impl, buf + align, seek_char, result) != 0) + { + error (0, 0, + "\tAlign=%zu, Pos=%zu, Len=%zu, seek=%d, max_char=%d, " + "Buf=%p, Res=%p", + align, pos, len, seek_char, max_char, buf, result); + } + } } static void