Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1405328rwb; Fri, 18 Nov 2022 18:28:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf6k17d5UPknaRJeDteY5MGa5DBud6ZsBp4cEwBi/KitVCBxR3s9MgUa5/Z18MDWeq6QbtZ5 X-Received: by 2002:a05:6a02:117:b0:477:55c:847c with SMTP id bg23-20020a056a02011700b00477055c847cmr9043573pgb.224.1668824897782; Fri, 18 Nov 2022 18:28:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668824897; cv=none; d=google.com; s=arc-20160816; b=ZqmTHdP2k3v5YTBMz3Qnx4rfBRyQGTn2Zi/MFxARw3vbqO4LWPFTkYhMAmK0rIW8Ww Rhpduk0A+gecNVlSlXZEVkk1YZi5Sw5QQ1Jw/n7ZymA1Oifg+nNSxwCwr3M2rGPvvqod OEhiyOgCVLMQj6aqWb0ZbzbkjtcuRfB2ZR+wSKS8n2WRca7O31yasWyoFgfuyq61U4Qc 5zpfJlyjmwuePdOia35XGnHacT+py+uV2K/+yY2dg5I+YQy+amALz5a2IwZLpE3bIT+E GGNAMQaMDVf2MgjSSsZYoWSvXEA/LpvfsZNZLuQA/R+Gih1ju2bdKBQO57UIZYJmV5ZL zYGA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a170902724500b00186ada25ac3si4578238pll.520.2022.11.18.18.28.06; Fri, 18 Nov 2022 18:28:17 -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 + 90 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 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 --- 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 -- 2.1.0