On Wed, Nov 30, 2022 at 06:18:34PM +0100, Eric Auger wrote: > Hi Jason, > > On 11/30/22 14:51, Jason Gunthorpe wrote: > > On Wed, Nov 30, 2022 at 03:14:32PM +0800, Yi Liu wrote: > >> On 2022/11/30 04:29, Jason Gunthorpe wrote: > >>> Cover the essential functionality of the iommufd with a directed test from > >>> userspace. This aims to achieve reasonable functional coverage using the > >>> in-kernel self test framework. > >>> > >>> A second test does a failure injection sweep of the success paths to study > >>> error unwind behaviors. > >>> > >>> This allows achieving high coverage of the corner cases in pages.c. > >>> > >>> Tested-by: Nicolin Chen <nicolinc@xxxxxxxxxx> > >>> Tested-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx> # s390 > >>> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > >>> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx> > >>> Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx> > >> with sudo echo 4 > /proc/sys/vm/nr_hugepages > >> > >> Both "sudo ./iommufd" and "sudo ./iommufd_fail_nth" works on my > >> side. > > It is interesting that you need that, my VM doesn't, I wonder what the > > difference is > > That's the same on my end, I need at least 2 hugepages to get all tests > passing. > Otherwise > # FAILED: 113 / 121 tests passed. > # Totals: pass:113 fail:8 xfail:0 xpass:0 skip:0 error:0 > > I think you should add this in the commit msg + also the fact that > CONFIG_IOMMUFD_TEST is required Done, thanks Jason