* [Devel] [PATCH vz10] selftests/tdx: skip when the TDX guest device is absent
@ 2026-08-21 15:07 Eva Kurchatova
2026-08-24 12:39 ` [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)
verify_report fails outside a TDX guest, where /dev/tdx_guest does not
exist.
https://virtuozzo.atlassian.net/browse/VSTOR-142444
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/tdx/tdx_guest_test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/tdx/tdx_guest_test.c b/tools/testing/selftests/tdx/tdx_guest_test.c
index 81d8cb88ea1a..ff8897ffee78 100644
--- a/tools/testing/selftests/tdx/tdx_guest_test.c
+++ b/tools/testing/selftests/tdx/tdx_guest_test.c
@@ -135,6 +135,8 @@ TEST(verify_report)
int devfd, i;
devfd = open(TDX_GUEST_DEVNAME, O_RDWR | O_SYNC);
+ if (devfd < 0)
+ SKIP(return, "TDX guest device is not available");
ASSERT_LT(0, devfd);
/* Generate sample report data */
--
2.55.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Devel] [PATCH vz10 v2] selftests/tdx: skip when the TDX guest device is absent
2026-08-21 15:07 [Devel] [PATCH vz10] selftests/tdx: skip when the TDX guest device is absent Eva Kurchatova
@ 2026-08-24 12:39 ` Konstantin Khorenko
2026-08-24 12:39 ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Khorenko @ 2026-08-24 12:39 UTC (permalink / raw)
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
verify_report fails outside a TDX guest, where /dev/tdx_guest does not
exist.
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-142444
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_LT() is reachable again and no longer dead code.
- commit message: explain why the skip is narrowed to a missing node.
tools/testing/selftests/tdx/tdx_guest_test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/tdx/tdx_guest_test.c b/tools/testing/selftests/tdx/tdx_guest_test.c
index 81d8cb88ea1a..612005b10f7c 100644
--- a/tools/testing/selftests/tdx/tdx_guest_test.c
+++ b/tools/testing/selftests/tdx/tdx_guest_test.c
@@ -135,6 +135,8 @@ TEST(verify_report)
int devfd, i;
devfd = open(TDX_GUEST_DEVNAME, O_RDWR | O_SYNC);
+ if (devfd < 0 && errno == ENOENT)
+ SKIP(return, "TDX guest device is not available");
ASSERT_LT(0, devfd);
/* Generate sample report data */
--
2.47.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Devel] [PATCH RHEL10 COMMIT] selftests/tdx: skip when the TDX guest device is absent
2026-08-24 12:39 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
@ 2026-08-24 12:39 ` Konstantin Khorenko
0 siblings, 0 replies; 3+ messages in thread
From: Konstantin Khorenko @ 2026-08-24 12:39 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 5156567b7d01fbc464b654ecf5173c058c4b617f
Author: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Date: Fri Aug 21 18:07:03 2026 +0300
selftests/tdx: skip when the TDX guest device is absent
verify_report fails outside a TDX guest, where /dev/tdx_guest does not
exist.
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-142444
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
tools/testing/selftests/tdx/tdx_guest_test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/tdx/tdx_guest_test.c b/tools/testing/selftests/tdx/tdx_guest_test.c
index 81d8cb88ea1a..612005b10f7c 100644
--- a/tools/testing/selftests/tdx/tdx_guest_test.c
+++ b/tools/testing/selftests/tdx/tdx_guest_test.c
@@ -135,6 +135,8 @@ TEST(verify_report)
int devfd, i;
devfd = open(TDX_GUEST_DEVNAME, O_RDWR | O_SYNC);
+ if (devfd < 0 && errno == ENOENT)
+ SKIP(return, "TDX guest device is not available");
ASSERT_LT(0, devfd);
/* Generate sample report data */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-24 12:39 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/tdx: skip when the TDX guest device is absent Eva Kurchatova
2026-08-24 12:39 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
2026-08-24 12:39 ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox