Hi,

On Thu, Apr 09, 2026 at 09:35:39PM +0530, Donet Tom wrote:
> Hi Mike
> 
> On 4/6/26 7:46 PM, Mike Rapoport wrote:
> 
>     From: "Mike Rapoport (Microsoft)" <[email protected]>
> 
>     Both tests create a hugettlb mapping, fill it with data and verify the
>     data, the only difference is that one uses file-backed memory and another
>     one uses anonymous memory.
> 
>     Merge both tests into a single file.
> 
>     Signed-off-by: Mike Rapoport (Microsoft) <[email protected]>
>     ---
>      tools/testing/selftests/mm/Makefile        |   1 -
>      tools/testing/selftests/mm/hugepage-mmap.c | 113 ++++++++++++++++-----
>      tools/testing/selftests/mm/map_hugetlb.c   |  88 ----------------
>      tools/testing/selftests/mm/run_vmtests.sh  |   1 -
>      4 files changed, 86 insertions(+), 117 deletions(-)
>      delete mode 100644 tools/testing/selftests/mm/map_hugetlb.c

...

> It looks like mmap_flags and fd are not used in this function.
> 
>     +                     const char *test_name)
>      {
>     +       int flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB;
> 
> 
> The same flags are being used for both file  and anonymous tests . It seems
> that test_file_mmap may be broken.
 
Thanks for catching this. Will fix in the next version.  
 
>             void *addr;
>     -       int fd, ret;
> 

-- 
Sincerely yours,
Mike.

Reply via email to