* [Devel] [PATCH vz10] selftests/nci: skip when the virtual NCI device is absent
@ 2026-08-21 15:07 Eva Kurchatova
2026-08-24 10:57 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
0 siblings, 1 reply; 3+ messages in thread
From: Eva Kurchatova @ 2026-08-21 15:07 UTC (permalink / raw)
All 8 tests fail in setup without CONFIG_NFC_VIRTUAL_NCI.
https://virtuozzo.atlassian.net/browse/VSTOR-142445
Feature: fix selftests
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 1562aa7d60b0..f21646b1db27 100644
--- a/tools/testing/selftests/nci/nci_dev.c
+++ b/tools/testing/selftests/nci/nci_dev.c
@@ -419,6 +419,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)
+ 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
^ permalink raw reply [flat|nested] 3+ messages in thread* [Devel] [PATCH vz10 v2] selftests/nci: skip when the virtual NCI device is absent
2026-08-21 15:07 [Devel] [PATCH vz10] selftests/nci: skip when the virtual NCI device is absent Eva Kurchatova
@ 2026-08-24 10:57 ` Konstantin Khorenko
2026-08-24 10:58 ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Khorenko @ 2026-08-24 10:57 UTC (permalink / raw)
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
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.
https://virtuozzo.atlassian.net/browse/VSTOR-142445
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
Changes in v2:
- skip only when the device node itself is missing (errno == ENOENT).
v1 skipped on any open() failure, so a real problem such as EPERM or
EBUSY was reported as a skip instead of a failure. As a side effect
the following ASSERT_GT() is reachable again and no longer dead code.
- commit message: explain why the skip is narrowed to a missing node.
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 1562aa7d60b0..c6fcfffc768d 100644
--- a/tools/testing/selftests/nci/nci_dev.c
+++ b/tools/testing/selftests/nci/nci_dev.c
@@ -419,6 +419,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.47.1
^ permalink raw reply [flat|nested] 3+ messages in thread* [Devel] [PATCH RHEL10 COMMIT] selftests/nci: skip when the virtual NCI device is absent
2026-08-24 10:57 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
@ 2026-08-24 10:58 ` Konstantin Khorenko
0 siblings, 0 replies; 3+ messages in thread
From: Konstantin Khorenko @ 2026-08-24 10:58 UTC (permalink / raw)
The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.8.vz10
------>
commit b8239000cd0692224a6384c55a8d03c9f02f63d2
Author: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Date: Fri Aug 21 18:07:32 2026 +0300
selftests/nci: skip when the virtual NCI device is absent
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.
https://virtuozzo.atlassian.net/browse/VSTOR-142445
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@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 1562aa7d60b0..c6fcfffc768d 100644
--- a/tools/testing/selftests/nci/nci_dev.c
+++ b/tools/testing/selftests/nci/nci_dev.c
@@ -419,6 +419,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,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-24 10:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-21 15:07 [Devel] [PATCH vz10] selftests/nci: skip when the virtual NCI device is absent Eva Kurchatova
2026-08-24 10:57 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
2026-08-24 10:58 ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
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.