selftests-mm-va_high_addr_switch-use-kselftest-framework.patch removed from -mm tree
The quilt patch titled
Subject: selftests/mm: va_high_addr_switch: use kselftest framework
has been removed from the -mm tree. Its filename was
selftests-mm-va_high_addr_switch-use-kselftest-framework.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Mike Rapoport (Microsoft)" <[email protected]>
Subject: selftests/mm: va_high_addr_switch: use kselftest framework
Date: Mon, 11 May 2026 19:28:05 +0300
Convert va_high_addr_switch test to use kselftest framework for reporting and tracking successful and failing runs.
Signed-off-by Mike Rapoport (Microsoft) <[email protected]>
Reviewed-by Luiz Capitulino <[email protected]>
Tested-by Luiz Capitulino <[email protected]>
Tested-by Sarthak Sharma <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Barry Song <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Dev Jain <[email protected]>
Cc Donet Tom <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc John Hubbard <[email protected]>
Cc Lance Yang <[email protected]>
Cc Leon Romanovsky <[email protected]>
Cc Liam Howlett <[email protected]>
Cc Li Wang <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Mark Brown <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Nico Pache <[email protected]>
Cc Peter Xu <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Zi Yan <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
tools/testing/selftests/mm/va_high_addr_switch.c | 41 ++++++------- 1 file changed, 20 insertions(+), 21 deletions(-)
tools/testing/selftests/mm/va_high_addr_switch.c renamed from tools/testing/selftests/mm/va_high_addr_switch.c~selftests-mm-va_high_addr_switch-use-kselftest-framework +20 -21
@@ -257,40 +257,35 @@ void testcases_init(void) switch_hint = addr_switch_hint; } -static int run_test (struct testcase *test,int count) +static void run_test (struct testcase *test,int count) {void *p; -int i, ret =KSFT_PASS ; +int i;for (i =0 ; i < count; i++) {struct testcase *t = test + i; p =mmap (t->addr, t->size,PROT_READ |PROT_WRITE , t->flags,-1 ,0 ); - -printf ("%s: %p - " , t->msg, p); -if (p ==MAP_FAILED ) { -printf ("FAILED\n" ); - ret =KSFT_FAIL ; +ksft_perror ("MAP_FAILED" ); +ksft_test_result_fail ("%s\n" , t->msg);continue ; }if (t->low_addr_required && p >= (void *)(switch_hint)) { -printf ("FAILED\n" ); - ret =KSFT_FAIL ; +ksft_print_msg ("%p not below switch hint\n" , p); +ksft_test_result_fail ("%s\n" , t->msg); }else {/* * Do a dereference of the address returned so that we catch * bugs in page fault handling */ memset (p,0 , t->size); -printf ("OK\n" ); +ksft_test_result_pass ("%s\n" , t->msg); }if (!t->keep_mapped)munmap (p, t->size); } - -return ret; }#ifdef __aarch64__
@@ -322,19 +317,23 @@ static int supported_arch(void)int main (int argc,char **argv) { -int ret, hugetlb_ret =KSFT_PASS ; +bool run_hugetlb = false; + +ksft_print_header ();if (!supported_arch ()) -return KSFT_SKIP ; +ksft_exit_skip ("Architecture not supported\n" ); + +if (argc ==2 && !strcmp (argv[1 ],"--run-hugetlb" )) + run_hugetlb = true;testcases_init (); - ret =run_test (testcases, sz_testcases); -if (argc ==2 && !strcmp (argv[1 ],"--run-hugetlb" )) - hugetlb_ret =run_test (hugetlb_testcases, sz_hugetlb_testcases); +ksft_set_plan (sz_testcases + (run_hugetlb ? sz_hugetlb_testcases :0 )); + +run_test (testcases, sz_testcases); +if (run_hugetlb) +run_test (hugetlb_testcases, sz_hugetlb_testcases); -if (ret ==KSFT_PASS && hugetlb_ret ==KSFT_PASS ) -return KSFT_PASS ; -else -return KSFT_FAIL ; +ksft_finished (); }
_
Patches currently in -mm which might be from [email protected] are