From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Date: Mon, 24 Aug 2026 14:39:50 +0200 Subject: [Devel] [PATCH RHEL10 COMMIT] selftests/tdx: skip when the TDX guest device is absent In-Reply-To: <20260824123937.442700-1-khorenko@virtuozzo.com> Message-ID: <202608241239.67OCdoG4442733@hci8VM.finist.virtuozzo.com> List-Id: 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 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 Signed-off-by: Konstantin Khorenko --- 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 */