diff options
| author | Eva Kurchatova <eva.kurchatova@virtuozzo.com> | 2026-09-09 00:48:12 +0300 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@nvidia.com> | 2026-09-11 12:05:01 -0300 |
| commit | b1cf7f04c28ff3389559965dc95addbbd02f9138 (patch) | |
| tree | ad033dacd2556644c50c086781bb9a0f3123f519 /tools/perf/scripts/python/bin | |
| parent | 1d56f4d6db3d2b2c93017a80c4f9c4cfffa9d193 (diff) | |
| download | linux-next-b1cf7f04c28ff3389559965dc95addbbd02f9138.tar.gz linux-next-b1cf7f04c28ff3389559965dc95addbbd02f9138.zip | |
iommufd/selftest: Skip when the mock device is not there
Both iommufd tests need the mock device the iommufd module registers
under CONFIG_IOMMUFD_TEST, and they open /dev/iommu in every fixture
without checking, so on a kernel that does not provide it every case
fails on the open.
Checking the open is not enough on its own. /dev/iommu appears as soon
as the iommufd module is loaded, which says nothing about the mock
device: the release config here is CONFIG_IOMMUFD=m with
CONFIG_IOMMUFD_TEST unset, so the open succeeds and the tests fail later
in the ioctls that drive the mock device instead. Only the debug config
sets CONFIG_IOMMUFD_TEST.
/sys/bus/iommufd_mock covers both, it exists only once the module is
loaded and the kernel was built with CONFIG_IOMMUFD_TEST. Check for it
once before handing over to the harness, rather than in each of the
fixtures, and report a skip. test_harness_run() is what TEST_HARNESS_MAIN
calls anyway, so the tests still run exactly as they did.
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Link: https://patch.msgid.link/20260908214825.2682078-2-eva.kurchatova@virtuozzo.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
