Skip to content

Commit

Permalink
tests: fix for kernel 6.9
Browse files Browse the repository at this point in the history
pidfd was changed by commit cb12fd8e0dab (pidfd: add pidfs). lsof now
returns pidfd and not [pidfd:$pid].

Adapt the test to that (and accept both forms).

Fixes #317.
  • Loading branch information
Jiri Slaby authored and Jiri Slaby (SUSE) committed May 17, 2024
1 parent 81a8bc3 commit 5847fb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 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,8 @@ $TARGET | (
exit 77
fi
line=$($lsof -p $pid -a -d $fd -F pfn| tr '\n' ' ')
if ! grep -Fq "p${pid} f${fd} n[pidfd:$pid]" <<<"$line"; then
if ! grep -Fq "p${pid} f${fd} n[pidfd:$pid]" <<<"$line" &&
! grep -Fq "p${pid} f${fd} npidfd" <<<"$line"; then
$lsof -p $pid -a -d $fd -F pfn
echo
echo $line
Expand Down

0 comments on commit 5847fb0

Please sign in to comment.