From 5847fb0140922e9376013c97bf67195882de975a Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Fri, 17 May 2024 07:46:40 +0200 Subject: [PATCH] tests: fix for kernel 6.9 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. --- lib/dialects/linux/tests/case-20-pidfd-pid.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dialects/linux/tests/case-20-pidfd-pid.bash b/lib/dialects/linux/tests/case-20-pidfd-pid.bash index ceeddb41..3260098a 100755 --- a/lib/dialects/linux/tests/case-20-pidfd-pid.bash +++ b/lib/dialects/linux/tests/case-20-pidfd-pid.bash @@ -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