From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B575C433E2 for ; Sat, 18 Jul 2020 17:59:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09B8520717 for ; Sat, 18 Jul 2020 17:59:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="oMc3OTnZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728121AbgGRR7E (ORCPT ); Sat, 18 Jul 2020 13:59:04 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:58045 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgGRR7D (ORCPT ); Sat, 18 Jul 2020 13:59:03 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 26DB172E5F; Sat, 18 Jul 2020 13:59:02 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=USbYRNufEsc8 1lGZg89VjtxBA1Y=; b=oMc3OTnZsPnjyq5Q0a2TQyRgGuCVUajiZq8CMVftkoxs k/mUuVlU7zcCZsvFs7ZMiBOx3Kl/D78xSuKnPgRAPqN+7JAsUcKpIMj/urOLe3d0 ekUdenom4mX6gP4qcTyIgqI97uzVrz2l/975MM6oDVFV0OodIiTtO1eh9u0/zgE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=n5WWni bfkH5QaaTT9kDiklEenkzF4BhYnpt75X3aLGXjuZmBe/nInX8ACdV3szWmdzT2WV THLHW9nMBlNDjxBQNf8amIOUoLw7t8ENbm5i5Rvy873kSApwxla1B75AKPQ6Mkt1 1hk81XQCaI7GuPzudW80exanF668nC4RIOEx8= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 1F39672E5E; Sat, 18 Jul 2020 13:59:02 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id A5C7572E5D; Sat, 18 Jul 2020 13:59:01 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Martin =?utf-8?Q?=C3=85gren?= Cc: "Randall S. Becker" , Denton Liu , git@vger.kernel.org Subject: Re: [PATCH] t3200: don't grep for `strerror()` string References: <00d001d65c80$3519c960$9f4d5c20$@nexbridge.com> <20200718094840.31269-1-martin.agren@gmail.com> Date: Sat, 18 Jul 2020 10:59:00 -0700 In-Reply-To: <20200718094840.31269-1-martin.agren@gmail.com> ("Martin =?utf-8?Q?=C3=85gren=22's?= message of "Sat, 18 Jul 2020 11:48:40 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 5C8B1654-C920-11EA-B1EF-2F5D23BA3BAF-77302942!pb-smtp2.pobox.com Content-Transfer-Encoding: quoted-printable Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Martin =C3=85gren writes: > In 6b7093064a ("t3200: test for specific errors", 2020-06-15), we > learned to grep stderr to ensure that the failing `git branch` > invocations fail for the right reason. In two of these tests, we grep > for "File exists", expecting the string to show up there since config.c > calls `error_errno()`, which ends up including `strerror(errno)` in the > error message. > > But as we saw in 4605a73073 ("t1091: don't grep for `strerror()` > string", 2020-03-08), there exists at least one implementation where > `strerror()` yields a slightly different string than the one we're > grepping for. In particular, these tests fail on the NonStop platform. > > Similar to 4605a73073, grep for the beginning of the string instead to > avoid relying on `strerror()` behavior. > > Reported-by: Randall S. Becker > Signed-off-by: Martin =C3=85gren > --- Yup, that looks like a good description and a fix to check only the parts of the message we write, ignoring what the system library may add. > Hi Randall, > > Does this fix the test for you? > > Martin Hopefully it would ;-)