From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 009AC1F47C for ; Sun, 15 Jan 2023 00:50:07 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=cs.ucla.edu header.i=@cs.ucla.edu header.a=rsa-sha256 header.s=78364E5A-2AF3-11ED-87FA-8298ECA2D365 header.b=NrovwAvf; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGrDW-00032j-9F; Sat, 14 Jan 2023 19:49:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGrDV-00032T-1e for bug-gnulib@gnu.org; Sat, 14 Jan 2023 19:49:45 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGrDT-0006JX-3Q for bug-gnulib@gnu.org; Sat, 14 Jan 2023 19:49:44 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D0A7D160044 for ; Sat, 14 Jan 2023 16:49:40 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id TnEWiSb-Vcf6; Sat, 14 Jan 2023 16:49:40 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DEB41160041; Sat, 14 Jan 2023 16:49:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu DEB41160041 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1673743779; bh=zRh9CIdPPDNjifzFbwqlXo3xvTEJ8oSTjVjocNtrJAI=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding; b=NrovwAvf9gIMu5Y1FsdynsfjPyRaLPlAtrWAVlkfTSSgRMuDcDb8yPf7HddTv3dB+ 5ky93VyM0An2Kwgpu3Gxmq9aXolCo9FeX8Rszu5FUM1dKSX3nLAaiRgCEOYNpRboza iuL/wi9ru1JiIPCWsmIMbn1fju3lbJgdBMUNExbM= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zRvBf4JJ1dcS; Sat, 14 Jan 2023 16:49:39 -0800 (PST) Received: from wing.lan1 (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B6CE0160040; Sat, 14 Jan 2023 16:49:39 -0800 (PST) From: Paul Eggert To: bug-gnulib@gnu.org Cc: Paul Eggert Subject: [PATCH] test-framework-sh: work around AIX 7.2 diff bugs Date: Sat, 14 Jan 2023 16:49:36 -0800 Message-Id: <20230115004936.112948-1-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org * tests/init.sh (compare_dev_null_): Run diff in the C locale. AIX 7.2 diff messes up in UTF-8 locales; for example, =E2=80=98printf '\360\220\200\200\n' | diff - /dev/null=E2=80=99 incorrec= tly outputs nothing and exits with status 0 when LC_ALL=3Den_US.UTF-8. --- ChangeLog | 8 ++++++++ tests/init.sh | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb467a3c14..0900c54c1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-01-14 Paul Eggert + + test-framework-sh: work around AIX 7.2 diff bugs + * tests/init.sh (compare_dev_null_): Run diff in the C locale. + AIX 7.2 diff messes up in UTF-8 locales; for example, + =E2=80=98printf '\360\220\200\200\n' | diff - /dev/null=E2=80=99 incorr= ectly + outputs nothing and exits with status 0 when LC_ALL=3Den_US.UTF-8. + 2023-01-14 Bruno Haible =20 error, verror tests: Fix link error when the package uses libintl. diff --git a/tests/init.sh b/tests/init.sh index 6c09392867..0494097e9f 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -646,18 +646,19 @@ compare_dev_null_ () =20 for diff_opt_ in -u -U3 -c '' no; do test "$diff_opt_" !=3D no && - diff_out_=3D`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null= ` && + diff_out_=3D`exec 2>/dev/null + LC_ALL=3DC diff $diff_opt_ "$0" "$0" < /dev/null` && break done if test "$diff_opt_" !=3D no; then if test -z "$diff_out_"; then - compare_ () { diff $diff_opt_ "$@"; } + compare_ () { LC_ALL=3DC diff $diff_opt_ "$@"; } else compare_ () { # If no differences were found, AIX and HP-UX 'diff' produce outpu= t # like "No differences encountered". Hide this output. - diff $diff_opt_ "$@" > diff.out + LC_ALL=3DC diff $diff_opt_ "$@" > diff.out diff_status_=3D$? test $diff_status_ -eq 0 || cat diff.out || diff_status_=3D2 rm -f diff.out || diff_status_=3D2 --=20 2.37.2