Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/memory-model: Use "grep -E" instead of "egrep"

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>
Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

authored by

Tiezhu Yang and committed by
Paul E. McKenney
2a8ec611 719bef0c

+2 -2
+2 -2
tools/memory-model/scripts/checkghlitmus.sh
··· 36 36 # Create a list of the specified litmus tests previously run. 37 37 ( cd $LKMM_DESTDIR; find litmus -name "*.litmus${hwfnseg}.out" -print ) | 38 38 sed -e "s/${hwfnseg}"'\.out$//' | 39 - xargs -r egrep -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' | 39 + xargs -r grep -E -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' | 40 40 xargs -r grep -L "^P${LKMM_PROCS}"> $T/list-C-already 41 41 42 42 # Create a list of C-language litmus tests with "Result:" commands and 43 43 # no more than the specified number of processes. 44 44 find litmus -name '*.litmus' -print | mselect7 -arch C > $T/list-C 45 - xargs < $T/list-C -r egrep -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' > $T/list-C-result 45 + xargs < $T/list-C -r grep -E -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' > $T/list-C-result 46 46 xargs < $T/list-C-result -r grep -L "^P${LKMM_PROCS}" > $T/list-C-result-short 47 47 48 48 # Form list of tests without corresponding .out files