From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: David Heidelberg <david@ixit.cz>,
Bongsu Jeon <bongsu.jeon@samsung.com>,
Shuah Khan <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Eva Kurchatova <eva.kurchatova@virtuozzo.com>,
netdev@vger.kernel.org, oe-linux-nfc@lists.linux.dev,
linux-kselftest@vger.kernel.org
Subject: [PATCH] selftests/nci: skip when the virtual NCI device is absent
Date: Fri, 25 Sep 2026 16:41:59 +0300 [thread overview]
Message-ID: <20260925134232.3638500-1-eva.kurchatova@virtuozzo.com> (raw)
All 8 tests fail in setup without CONFIG_NFC_VIRTUAL_NCI.
Skip only when the device node is missing, so that a real open()
failure, EPERM or EBUSY, still fails the test instead of being
reported as a skip.
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/nci/nci_dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/nci/nci_dev.c b/tools/testing/selftests/nci/nci_dev.c
index 07427fa42888..cb567d6f32ed 100644
--- a/tools/testing/selftests/nci/nci_dev.c
+++ b/tools/testing/selftests/nci/nci_dev.c
@@ -430,6 +430,8 @@ FIXTURE_SETUP(NCI)
ASSERT_NE(self->fid, -1);
self->virtual_nci_fd = open("/dev/virtual_nci", O_RDWR);
+ if (self->virtual_nci_fd < 0 && errno == ENOENT)
+ SKIP(return, "virtual NCI device is not available");
ASSERT_GT(self->virtual_nci_fd, -1);
rc = setsockopt(self->sd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &event_group,
--
2.55.0
next reply other threads:[~2026-09-25 13:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 13:41 Eva Kurchatova [this message]
2026-09-26 16:54 ` [PATCH] selftests/nci: skip when the virtual NCI device is absent Simon Horman
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=20260925134232.3638500-1-eva.kurchatova@virtuozzo.com \
--to=eva.kurchatova@virtuozzo.com \
--cc=bongsu.jeon@samsung.com \
--cc=david@ixit.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-linux-nfc@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox