* [PATCH] tools/memory-model: Use "grep -E" instead of "egrep"
@ 2022-11-19 2:13 Tiezhu Yang
2022-11-20 11:19 ` Akira Yokosawa
0 siblings, 1 reply; 3+ messages in thread
From: Tiezhu Yang @ 2022-11-19 2:13 UTC (permalink / raw)
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, linux-kernel
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 <yangtiezhu@loongson.cn>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/memory-model: Use "grep -E" instead of "egrep"
2022-11-19 2:13 [PATCH] tools/memory-model: Use "grep -E" instead of "egrep" Tiezhu Yang
@ 2022-11-20 11:19 ` Akira Yokosawa
2022-11-21 3:02 ` Tiezhu Yang
0 siblings, 1 reply; 3+ messages in thread
From: Akira Yokosawa @ 2022-11-20 11:19 UTC (permalink / raw)
To: Tiezhu Yang, Paul E. McKenney
Cc: linux-arch, linux-kernel, Alan Stern, Andrea Parri, Will Deacon,
Peter Zijlstra, Boqun Feng, Nicholas Piggin, David Howells,
Jade Alglave, Luc Maranget, Daniel Lustig, Joel Fernandes,
Akira Yokosawa
On Sat, 19 Nov 2022 10:13:18 +0800, Tiezhu Yang wrote:
> 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 <yangtiezhu@loongson.cn>
> ---
> 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
Looks good to me.
Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
Paul, JFYI, this patch doesn't apply cleanly on -rcu dev due to
a couple of changes in the lkmm-dev.2022.10.18c branch.
Thanks, Akira
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/memory-model: Use "grep -E" instead of "egrep"
2022-11-20 11:19 ` Akira Yokosawa
@ 2022-11-21 3:02 ` Tiezhu Yang
0 siblings, 0 replies; 3+ messages in thread
From: Tiezhu Yang @ 2022-11-21 3:02 UTC (permalink / raw)
To: Akira Yokosawa, Paul E. McKenney
Cc: linux-arch, linux-kernel, Alan Stern, Andrea Parri, Will Deacon,
Peter Zijlstra, Boqun Feng, Nicholas Piggin, David Howells,
Jade Alglave, Luc Maranget, Daniel Lustig, Joel Fernandes
On 11/20/2022 07:19 PM, Akira Yokosawa wrote:
> On Sat, 19 Nov 2022 10:13:18 +0800, Tiezhu Yang wrote:
>> 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 <yangtiezhu@loongson.cn>
>> ---
>> 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
>
> Looks good to me.
>
> Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
>
> Paul, JFYI, this patch doesn't apply cleanly on -rcu dev due to
> a couple of changes in the lkmm-dev.2022.10.18c branch.
>
> Thanks, Akira
>
Hi Akira,
Thanks for your review, sorry for that, let me rebase on
linux-rcu.git dev and send v2 later.
Thanks,
Tiezhu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-21 3:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-19 2:13 [PATCH] tools/memory-model: Use "grep -E" instead of "egrep" Tiezhu Yang
2022-11-20 11:19 ` Akira Yokosawa
2022-11-21 3:02 ` Tiezhu Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).