GNU grep 3.8 gives a deprecation warning when using egrep or fgrep.
Just use grep -E and grep -F.
Signed-off-by: Mark Wielaard <mark@klomp.org>
2022-10-27 Mark Wielaard <mark@klomp.org>
+ * eu.am: Use grep -F instead of fgrep.
+
+2022-10-27 Mark Wielaard <mark@klomp.org>
+
* elfutils.spec.in: Add BuildRequires socat.
2022-08-17 Martin Liska <mliska@suse.cz>
else
textrel_found = $(textrel_msg)
endif
-textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi
+textrel_check = if $(READELF) -d $@ | grep -F -q TEXTREL; then $(textrel_found); fi
print-%:
@echo $*=$($*)
+2022-10-27 Mark Wielaard <mark@klomp.org>
+
+ * backtrace-subr.sh: Use grep -E instead of egrep, use grep -F
+ instead of fgrep.
+ * debuginfod-subr.sh: Likewise.
+ * run-debuginfod-archive-rename.sh: Likewise.
+ * run-debuginfod-extraction-passive.sh: Likewise.
+ * run-debuginfod-response-headers.sh: Likewise.
+ * run-debuginfod-webapi-concurrency.sh: Likewise.
+ * run-strip-test.sh: Likewise.
+
2022-10-16 Mark Wielaard <mark@klomp.org>
* dwfl-report-offline-memory.c: Include config.h first.
# Ignore it here as it is a bug of OS, not a bug of elfutils.
check_err()
{
- if [ $(egrep -v <$1 'dwfl_thread_getframes: (No DWARF information found|no matching address range|address out of range|Invalid register|\(null\))$' \
+ if [ $(grep -E -v <$1 'dwfl_thread_getframes: (No DWARF information found|no matching address range|address out of range|Invalid register|\(null\))$' \
| wc -c) \
-eq 0 ]
then
# and we can fall back on .debug_frame for the CFI.
case "`uname -m`" in
arm* )
- if egrep 'dwfl_thread_getframes(.*)No DWARF information found' $err; then
+ if grep -E 'dwfl_thread_getframes(.*)No DWARF information found' $err; then
echo >&2 $testname: arm needs debuginfo installed for all libraries
exit 77
fi
get_ports() {
while true; do
PORT1=`expr '(' $RANDOM % 50 ')' + $base`
- ss -atn | fgrep ":$PORT1" || break
+ ss -atn | grep -F ":$PORT1" || break
done
# Some tests will use two servers, so assign the second var
while true; do
PORT2=`expr '(' $RANDOM % 50 ')' + $base + 50`
- ss -atn | fgrep ":$PORT2" || break
+ ss -atn | grep -F ":$PORT2" || break
done
}
archive_test bc1febfd03ca05e030f0d205f7659db29f8a4b30 /usr/src/debug/hello-1.0/hello.c $SHA
archive_test f0aa15b8aba4f3c28cac3c2a73801fefa644a9f2 /usr/src/debug/hello-1.0/hello.c $SHA
-egrep '(libc.error.*rhel7)|(bc1febfd03ca)|(f0aa15b8aba)' vlog$PORT1
+grep -E '(libc.error.*rhel7)|(bc1febfd03ca)|(f0aa15b8aba)' vlog$PORT1
kill $PID1
wait $PID1
wait_ready $PORT1 'thread_busy{role="scan"}' 0
# No similar metrics for the passive server
-! (curl http://localhost:$PORT2/metrics | egrep 'role="scan"|role="groom"|role="traverse"')
+! (curl http://localhost:$PORT2/metrics | grep -E 'role="scan"|role="groom"|role="traverse"')
# Confirm no active threads
-! (ps -q $PID2 -e -L -o '%p %c %a' | egrep 'scan|groom|traverse')
+! (ps -q $PID2 -e -L -o '%p %c %a' | grep -E 'scan|groom|traverse')
# Do a random lookup via passive server
env LD_LIBRARY_PATH=$ldpath DEBUGINFOD_URLS=http://localhost:$PORT2 ${abs_builddir}/../debuginfod/debuginfod-find debuginfo cee13b2ea505a7f37bd20d271c6bc7e5f8d2dfcb
for file in vlog-find$PORT1.1 vlog-find$PORT1.2
do
st_size=$(stat -c%s $(tail -n 1 $file))
- x_debuginfod_size=$(grep -i 'X-DEBUGINFOD-SIZE' $file | head -1 | egrep -o '[0-9]+')
+ x_debuginfod_size=$(grep -i 'X-DEBUGINFOD-SIZE' $file | head -1 | grep -E -o '[0-9]+')
test $st_size -eq $x_debuginfod_size
done
wait_ready $PORT1 'http_responses_transfer_bytes_count{code="200",type="debuginfo"}' $lookup_nr
(sleep 5;
- curl -s http://localhost:$PORT1/metrics | egrep 'error|responses';
+ curl -s http://localhost:$PORT1/metrics | grep -E 'error|responses';
kill $PID1) &
wait # for all curls, the ()& from just above, and for debuginfod
PID1=0
tempfiles testfile.sections
testrun ${abs_top_builddir}/src/readelf -S testfile.temp > testfile.sections || status=$?
-fgrep ' .debug_' testfile.sections && status=1
+grep -F ' .debug_' testfile.sections && status=1
exit $status