From patchwork Sat Nov 19 02:13:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 23181 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp518483wrr; Fri, 18 Nov 2022 18:17:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf5e7hcKx9dotR3rusgj+kkEJ6jAEfpmeazO0h4Gjs+TVKEdTpSLA3hlco9WyzA843hAWU2x X-Received: by 2002:aa7:9f9c:0:b0:53e:81ab:9419 with SMTP id z28-20020aa79f9c000000b0053e81ab9419mr10601684pfr.15.1668824274640; Fri, 18 Nov 2022 18:17:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668824274; cv=none; d=google.com; s=arc-20160816; b=YZLgT7g5Vmiu256HoevrU4JOvszlET/d9z7IilfxcYJKQR8/hCuAXh5zGdndN3sR2J SNGEIOsxsALQr4NcEm27t5UaHuhgqtx4SWdUW6C3Y40rPviZUuC6Nj3ivwtadBzaj1oI ftTU4kPxO2z1i56vwjQYJkzC0PmhrGhB6FoERzekXt8iiThWob3mb+Pjty0BwmJv2ELb Wypr3lDp+3ogpC2NZY96N2RlSMEWcXAMnPgRnSQXIqlMt+7f7s1He8QNYk0AOdwSA5x4 BsSWunvDk3Y1fY9lWXSCLeJegC4VnC63jr4PQd81Zx/5CCF62pIE62agrclyz0PX1pj8 IDyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=7R8YcZnBltL0rqgWx9aB0UP1wBfeFLYR0BNmR2dNbFA=; b=nQYOySzYk0l4RFQCm3NOwz99axt72WbiThT8A0keTxDzH+TuNIOOd0ESMNhR2/UoUl mWXM+nfdSv13v3MjsnwpAig5CLvgxmRl5p1ohe+cPlkC5FJNl9E1NfqgiM8q+oTNLOVt fGhgjFFIvUWLlUUKAIHW4pK3mzSk0go15zK8+yIYo8U77hzgu07zk94uxKK4QlkUYA4T OXIWEfrjkTRdWxebA2B4z03r6frqvfURUkhdO40jKx+W95fC+PZoyhEmYso+6qGBf/pG rPQp8x9u8zMPRWmOH3axzTUtvl1Jle/Z7r78YOP9FwgQXuFLwtZlEP1UIBJ3BUPQtlWG FAqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g17-20020a056a000b9100b00554e240fa1bsi5549661pfj.95.2022.11.18.18.17.42; Fri, 18 Nov 2022 18:17:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235230AbiKSCRU (ORCPT + 99 others); Fri, 18 Nov 2022 21:17:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235349AbiKSCQz (ORCPT ); Fri, 18 Nov 2022 21:16:55 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C906D2DE; Fri, 18 Nov 2022 18:13:29 -0800 (PST) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Dx_7fHO3hj1cgIAA--.23153S3; Sat, 19 Nov 2022 10:13:27 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxPuLEO3hjLsEWAA--.59786S2; Sat, 19 Nov 2022 10:13:24 +0800 (CST) From: Tiezhu Yang To: Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] tools/memory-model: Use "grep -E" instead of "egrep" Date: Sat, 19 Nov 2022 10:13:18 +0800 Message-Id: <1668823998-28548-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf8DxPuLEO3hjLsEWAA--.59786S2 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7uFWUCFy3Kw4Dtw1DWw4kWFg_yoW8CFyUpF Z8A345KwsIvFyUXF40kF4rZFnrKan3JFyxGrZIyan8XrnxGF4ayrySqF45AFnFqFWDXw4r CFWqvFy7Ww45CaDanT9S1TB71UUUUjJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bfkYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z280aVCY1x0267AKxVW8JVW8Jr1ln4kS 14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv 67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxVAaw2 AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xF xVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWw C2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_ Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJV WUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIY CTnIWIevJa73UjIFyTuYvjxU4SoGDUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749889082470360291?= X-GMAIL-MSGID: =?utf-8?q?1749889082470360291?= The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/memory-model` Here are the steps to install the latest grep: wget http://ftp.gnu.org/gnu/grep/grep-3.8.tar.gz tar xf grep-3.8.tar.gz cd grep-3.8 && ./configure && make sudo make install export PATH=/usr/local/bin:$PATH Signed-off-by: Tiezhu Yang Reviewed-by: Akira Yokosawa --- tools/memory-model/scripts/checkghlitmus.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/memory-model/scripts/checkghlitmus.sh b/tools/memory-model/scripts/checkghlitmus.sh index 6589fbb..f72816a 100755 --- a/tools/memory-model/scripts/checkghlitmus.sh +++ b/tools/memory-model/scripts/checkghlitmus.sh @@ -35,13 +35,13 @@ fi # Create a list of the C-language litmus tests previously run. ( cd $LKMM_DESTDIR; find litmus -name '*.litmus.out' -print ) | sed -e 's/\.out$//' | - xargs -r egrep -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' | + xargs -r grep -E -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' | xargs -r grep -L "^P${LKMM_PROCS}"> $T/list-C-already # Create a list of C-language litmus tests with "Result:" commands and # no more than the specified number of processes. find litmus -name '*.litmus' -exec grep -l -m 1 "^C " {} \; > $T/list-C -xargs < $T/list-C -r egrep -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' > $T/list-C-result +xargs < $T/list-C -r grep -E -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' > $T/list-C-result xargs < $T/list-C-result -r grep -L "^P${LKMM_PROCS}" > $T/list-C-result-short # Form list of tests without corresponding .litmus.out files