Re: [PATCH v5 5/5] vfio: selftests: add end of address space DMA map/unmap tests
From: David Matlack
Date: Mon Oct 27 2025 - 19:45:34 EST
On 2025-10-27 10:33 AM, Alex Mastro wrote:
> Add tests which validate dma map/unmap at the end of address space. Add
> negative test cases for checking that overflowing ioctl args fail with
> the expected errno.
>
> Signed-off-by: Alex Mastro <amastro@xxxxxx>
Reviewed-by: David Matlack <dmatlack@xxxxxxxxxx>
> +FIXTURE_SETUP(vfio_dma_map_limit_test)
> +{
> + u64 region_size = getpagesize();
nit: Add a blank line after variable declarations.
> + /*
> + * Over-allocate mmap by double the size to provide enough backing vaddr
> + * for overflow tests
> + */
> + self->mmap_size = 2 * region_size;
> + struct vfio_dma_region *region = &self->region;
nit: Declare variables at the beginning of blocks.