From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7C3683858434 for ; Thu, 18 May 2023 12:56:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C3683858434 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684414616; 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: in-reply-to:in-reply-to:references:references; bh=c32aHhoNhDUZEBw/3QnwBVxbozePgAT2pxEyet4e1u8=; b=NA64h8UMvcN1yLYWAClOVClzkg4mho8Gz0Wnb6bg5gBhbhO5wqLZEj2nKCwkQ1hkYTeR1W OB8m/H3bN8WoepDSWMaVPA8xmyq/BQV9hZQzf78QAbDAA8hlzdOwkZ3D6ok3DflJRqRFKS JMPQ0qU7zNw5JwGbJxHSzh79MvAqSAw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-98-ZA7R9IfDNx6jPL1o6VF3Ew-1; Thu, 18 May 2023 08:56:55 -0400 X-MC-Unique: ZA7R9IfDNx6jPL1o6VF3Ew-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C131B80269A for ; Thu, 18 May 2023 12:56:54 +0000 (UTC) Received: from localhost (unknown [10.42.28.213]) by smtp.corp.redhat.com (Postfix) with ESMTP id 632871415304 for ; Thu, 18 May 2023 12:56:54 +0000 (UTC) From: Jonathan Wakely To: gcc-patches@gcc.gnu.org Subject: [PATCH 3/3] contrib: Fix nonportable shell syntax in "test" and "[" commands [PR105831] Date: Thu, 18 May 2023 13:56:47 +0100 Message-Id: <20230518125647.2105203-4-jwakely@redhat.com> In-Reply-To: <20230518125647.2105203-1-jwakely@redhat.com> References: <20230518125647.2105203-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: POSIX sh does not support the == for string comparisons, use = instead. These contrib scripts all use a bash shebang so == does work, but there's no reason they can't just use the more portable form anyway. PR bootstrap/105831 contrib/ChangeLog: * bench-stringop: Use = operator instead of ==. * repro_fail: Likewise. contrib/reghunt/ChangeLog: * bin/reg-hunt: Use = operator instead of ==. --- contrib/bench-stringop | 4 ++-- contrib/reghunt/bin/reg-hunt | 2 +- contrib/repro_fail | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/bench-stringop b/contrib/bench-stringop index daf1bce6e6f..f058e066b3a 100755 --- a/contrib/bench-stringop +++ b/contrib/bench-stringop @@ -87,7 +87,7 @@ test "$2" "$3" "-mstringop-strategy=rep_byte -malign-stringops" rep1 test "$2" "$3" "-mstringop-strategy=rep_byte -mno-align-stringops" rep1noalign test "$2" "$3" "-mstringop-strategy=rep_4byte -malign-stringops" rep4 test "$2" "$3" "-mstringop-strategy=rep_4byte -mno-align-stringops" rep4noalign -if [ "$mode" == 64 ] +if [ "$mode" = 64 ] then test "$2" "$3" "-mstringop-strategy=rep_8byte -malign-stringops" rep8 test "$2" "$3" "-mstringop-strategy=rep_8byte -mno-align-stringops" rep8noalign @@ -109,7 +109,7 @@ echo " $best" test_all_sizes() { -if [ "$mode" == 64 ] +if [ "$mode" = 64 ] then echo " block size libcall rep1 noalg rep4 noalg rep8 noalg loop noalg unrl noalg sse noalg byte PGO dynamic BEST" else diff --git a/contrib/reghunt/bin/reg-hunt b/contrib/reghunt/bin/reg-hunt index 6427535dabe..aff4e9005b5 100755 --- a/contrib/reghunt/bin/reg-hunt +++ b/contrib/reghunt/bin/reg-hunt @@ -142,7 +142,7 @@ process_patch () { # build failures, quit now. if [ ${SKIP} -eq 0 ]; then - if [ "x${REG_NEWMID}" == "x" \ + if [ "x${REG_NEWMID}" = "x" \ -o ${TEST_ID} -eq ${LATER_THAN} \ -o ${TEST_ID} -eq ${EARLIER_THAN} ]; then error "build failed for ${TEST_ID}" diff --git a/contrib/repro_fail b/contrib/repro_fail index 9ea79f2bccf..abb479d08aa 100755 --- a/contrib/repro_fail +++ b/contrib/repro_fail @@ -42,10 +42,10 @@ if [ $# -lt 2 ] ; then exit 1 fi -if [ "$1" == "--debug" ] ; then +if [ "$1" = "--debug" ] ; then debug_args="-wrapper gdb,--args" shift -elif [ "$1" == "--debug-tui" ] ; then +elif [ "$1" = "--debug-tui" ] ; then debug_args="-wrapper gdb,--tui,--args" shift else -- 2.40.1