From: "Jin Li" <jinli@lanxincomputing.com>
To: "Shuah Khan" <shuah@kernel.org>,
"Pablo Neira Ayuso" <pablo@netfilter.org>,
"Florian Westphal" <fw@strlen.de>
Cc: <netfilter-devel@vger.kernel.org>,
<linux-kselftest@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Jin Li" <jinli@lanxincomputing.com>
Subject: [PATCH] selftests: netfilter: fix nft_audit.sh auditd detection
Date: Fri, 11 Sep 2026 03:56:32 +0000 [thread overview]
Message-ID: <20260911035632.491163-1-jinli@lanxincomputing.com> (raw)
The auditd PID file location changed from /var/run/auditd.pid to
/run/audit/auditd.pid in newer audit-userspace versions, causing the
skip check in nft_audit.sh to fail silently.
Replace the PID file check with pgrep, which works regardless of
where the PID file is located.
Signed-off-by: Jin Li <jinli@lanxincomputing.com>
---
tools/testing/selftests/net/netfilter/nft_audit.sh | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/net/netfilter/nft_audit.sh b/tools/testing/selftests/net/netfilter/nft_audit.sh
index 87f2b4c725aa..85cc4ce7742a 100755
--- a/tools/testing/selftests/net/netfilter/nft_audit.sh
+++ b/tools/testing/selftests/net/netfilter/nft_audit.sh
@@ -6,14 +6,9 @@
SKIP_RC=4
RC=0
-if [ -r /var/run/auditd.pid ];then
- read pid < /var/run/auditd.pid
- p=$(pgrep ^auditd$)
-
- if [ "$pid" -eq "$p" ]; then
- echo "SKIP: auditd is running"
- exit $SKIP_RC
- fi
+if pgrep -x auditd > /dev/null; then
+ echo "SKIP: auditd is running"
+ exit $SKIP_RC
fi
nft --version >/dev/null 2>&1 || {
--
2.53.0
reply other threads:[~2026-09-11 3:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260911035632.491163-1-jinli@lanxincomputing.com \
--to=jinli@lanxincomputing.com \
--cc=fw@strlen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.