Skip to content

Commit

Permalink
tests: eliminate use of fgrep
Browse files Browse the repository at this point in the history
fgrep use is deprecated. Use grep -F instead.

See: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a95156247098
  • Loading branch information
Jiri Slaby (SUSE) authored and jiegec committed May 17, 2024
1 parent 0a979c5 commit 3729186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ expectation="n[${v6addr}]:$port"
result=1
if "${lsof}" -p "${pid}" -a -d fd -P -n -F n \
| tee -a "${report}" \
| fgrep -q "$expectation"; then
| grep -Fq "$expectation"; then
result=0
fi

Expand Down
2 changes: 1 addition & 1 deletion lib/dialects/linux/tests/case-20-pidfd-pid.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $TARGET | (
exit 77
fi
line=$($lsof -p $pid -a -d $fd -F pfn| tr '\n' ' ')
if ! fgrep -q "p${pid} f${fd} n[pidfd:$pid]" <<<"$line"; then
if ! grep -Fq "p${pid} f${fd} n[pidfd:$pid]" <<<"$line"; then
$lsof -p $pid -a -d $fd -F pfn
echo
echo $line
Expand Down

0 comments on commit 3729186

Please sign in to comment.