Skip to content

Commit 7563fcb

Browse files
x-y-zakpm00
authored andcommitted
selftests/mm: fix split_huge_page_test for folio_split() tests
PID_FMT does not have an offset field, so folio_split() tests are not performed. Add PID_FMT_OFFSET with an offset field and use it to perform folio_split() tests. Link: https://lkml.kernel.org/r/[email protected] Fixes: 80a5c49 ("selftests/mm: add tests for folio_split(), buddy allocator like split") Signed-off-by: Zi Yan <[email protected]> Tested-by: Baolin Wang <[email protected]> Reviewed-by: Lorenzo Stoakes <[email protected]> Reviewed-by: Donet Tom <[email protected]> Tested-by : Donet Tom <[email protected]> Cc: Barry Song <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Dev Jain <[email protected]> Cc: Liam Howlett <[email protected]> Cc: Mariano Pache <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Shuah Khan <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 091a08b commit 7563fcb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/mm/split_huge_page_test.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ uint64_t pmd_pagesize;
3131
#define INPUT_MAX 80
3232

3333
#define PID_FMT "%d,0x%lx,0x%lx,%d"
34+
#define PID_FMT_OFFSET "%d,0x%lx,0x%lx,%d,%d"
3435
#define PATH_FMT "%s,0x%lx,0x%lx,%d"
3536

3637
#define PFN_MASK ((1UL<<55)-1)
@@ -483,7 +484,7 @@ void split_thp_in_pagecache_to_order_at(size_t fd_size, const char *fs_loc,
483484
write_debugfs(PID_FMT, getpid(), (uint64_t)addr,
484485
(uint64_t)addr + fd_size, order);
485486
else
486-
write_debugfs(PID_FMT, getpid(), (uint64_t)addr,
487+
write_debugfs(PID_FMT_OFFSET, getpid(), (uint64_t)addr,
487488
(uint64_t)addr + fd_size, order, offset);
488489

489490
for (i = 0; i < fd_size; i++)

0 commit comments

Comments
 (0)