Even after applying this config patch and following snippet (which doesn't terminate the program if mmap doesn't allocate exactly as the hint), I'm finding failed tests.
@@ -1746,7 +1748,7 @@ FIXTURE_SETUP(iommufd_dirty_tracking) assert((uintptr_t)self->buffer % HUGEPAGE_SIZE == 0); vrc = mmap(self->buffer, variant->buffer_size, PROT_READ | PROT_WRITE, mmap_flags, -1, 0); - assert(vrc == self->buffer); + assert(vrc == self->buffer);// ???
On x86: # Totals: pass:176 fail:4 xfail:0 xpass:0 skip:0 error:0 On ARM64: # Totals: pass:166 fail:14 xfail:0 xpass:0 skip:0 error:0
The log files are attached.
On 3/25/24 2:00 PM, Muhammad Usama Anjum wrote:
Add FAULT_INJECTION_DEBUG_FS and FAILSLAB configurations which are needed by iommufd_fail_nth test.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com
While building and running these tests on x86, defconfig had these configs enabled. But ARM64's defconfig doesn't enable these configs. Hence the config options are being added explicitly in this patch.
tools/testing/selftests/iommu/config | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/iommu/config b/tools/testing/selftests/iommu/config index 110d73917615d..02a2a1b267c1e 100644 --- a/tools/testing/selftests/iommu/config +++ b/tools/testing/selftests/iommu/config @@ -1,3 +1,5 @@ CONFIG_IOMMUFD=y +CONFIG_FAULT_INJECTION_DEBUG_FS=y CONFIG_FAULT_INJECTION=y CONFIG_IOMMUFD_TEST=y +CONFIG_FAILSLAB=y