From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDDAB2F6170 for ; Mon, 30 Mar 2026 19:26:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774898760; cv=none; b=Llg4zdNjWJTEgREUDVaYjTRQiAkRNFvkHwVkUpBuXkAhs50qAbupYb9m1csyqY5nPKqqawJoaD2UO9YrPduxPfogtX6esodGfOL9mYg2i7hnn5Rq409lG0XZbVVilUmRqCHQ0BxeM73zaoGqK1QiQk/4jDzc0ja5nNzqFhM0c+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774898760; c=relaxed/simple; bh=I1vxJfId4f8jGgnwW/JYekx4+d2XIqrVQoL7C68TTTU=; h=Date:To:From:Subject:Message-Id; b=dJn7qX37fqjUJEapy+NslBr4EC07fLXn0I4EPHwETXpNK2oregpqQ7k4DDQ2nv1ALUP4CcK7f40MMuYKq6FJL41REArePLBX/Z5xXBqoXQIp+fLlCaSdpfB+QRPhOVzYQglMJzJKTZgpKENHezJ1fXWlXgA1YpUinhrkm5f6oSE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=UFPDGA0u; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="UFPDGA0u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71255C4CEF7; Mon, 30 Mar 2026 19:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774898760; bh=I1vxJfId4f8jGgnwW/JYekx4+d2XIqrVQoL7C68TTTU=; h=Date:To:From:Subject:From; b=UFPDGA0ur/P5jVarb2xR6uorrN20h3zlJ/I6r8xhNNm730ay8TzFKdrjgH8t2gUzj kbtCQEhkSc9Xc3CI2oPiOaH9ROjFu9RBJxeB0NL6IFU2dZeoOrEYvdiVudiRTHPTcO OGqeqLPMwBrFtbLUMK2coMsBSXJ8WFqmPFWhnbeo= Date: Mon, 30 Mar 2026 12:25:59 -0700 To: mm-commits@vger.kernel.org,chuhu@redhat.com,akpm@linux-foundation.org From: Andrew Morton Subject: + selftests-mm-guard-regions-skip-collapse-test-when-thp-not-enabled.patch added to mm-unstable branch Message-Id: <20260330192600.71255C4CEF7@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: selftests/mm/guard-regions: skip collapse test when thp not enabled has been added to the -mm mm-unstable branch. Its filename is selftests-mm-guard-regions-skip-collapse-test-when-thp-not-enabled.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-guard-regions-skip-collapse-test-when-thp-not-enabled.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Chunyu Hu Subject: selftests/mm/guard-regions: skip collapse test when thp not enabled Date: Mon, 30 Mar 2026 23:14:57 +0800 Patch series "selftests/mm: skip several tests when thp is not available", v7. There are several tests requires transprarent hugepages, when run on thp disabled kernel such as realtime kernel, there will be false negative. Mark those tests as skip when thp is not available. This patch (of 7): When thp is not available, just skip the collape tests to avoid the false negative. Without the change, run with a thp disabled kernel: ./run_vmtests.sh -t madv_guard -n 1 # RUN guard_regions.anon.collapse ... # guard-regions.c:2217:collapse:Expected madvise(ptr, size, MADV_NOHUGEPAGE) (-1) == 0 (0) # collapse: Test terminated by assertion # FAIL guard_regions.anon.collapse not ok 2 guard_regions.anon.collapse # RUN guard_regions.shmem.collapse ... # guard-regions.c:2217:collapse:Expected madvise(ptr, size, MADV_NOHUGEPAGE) (-1) == 0 (0) # collapse: Test terminated by assertion # FAIL guard_regions.shmem.collapse not ok 32 guard_regions.shmem.collapse # RUN guard_regions.file.collapse ... # guard-regions.c:2217:collapse:Expected madvise(ptr, size, MADV_NOHUGEPAGE) (-1) == 0 (0) # collapse: Test terminated by assertion # FAIL guard_regions.file.collapse not ok 62 guard_regions.file.collapse # FAILED: 87 / 90 tests passed. # 17 skipped test(s) detected. Consider enabling relevant config options to improve coverage. # Totals: pass:70 fail:3 xfail:0 xpass:0 skip:17 error:0 With this change, run with thp disabled kernel: ./run_vmtests.sh -t madv_guard -n 1 # RUN guard_regions.anon.collapse ... # SKIP Transparent Hugepages not available # OK guard_regions.anon.collapse ok 2 guard_regions.anon.collapse # SKIP Transparent Hugepages not available # RUN guard_regions.file.collapse ... # SKIP Transparent Hugepages not available # OK guard_regions.file.collapse ok 62 guard_regions.file.collapse # SKIP Transparent Hugepages not available # RUN guard_regions.shmem.collapse ... # SKIP Transparent Hugepages not available # OK guard_regions.shmem.collapse ok 32 guard_regions.shmem.collapse # SKIP Transparent Hugepages not available # PASSED: 90 / 90 tests passed. # 20 skipped test(s) detected. Consider enabling relevant config options to improve coverage. # Totals: pass:70 fail:0 xfail:0 xpass:0 skip:20 error:0 Link: https://lkml.kernel.org/r/20260330151503.670415-1-chuhu@redhat.com Link: https://lkml.kernel.org/r/20260330151503.670415-2-chuhu@redhat.com Signed-off-by: Chunyu Hu Reviewed-by: Lorenzo Stoakes (Oracle) Acked-by: David Hildenbrand (Arm) Reviewed-by: Zi Yan Acked-by: Mike Rapoport (Microsoft) Cc: Li Wang Signed-off-by: Andrew Morton --- tools/testing/selftests/mm/guard-regions.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/tools/testing/selftests/mm/guard-regions.c~selftests-mm-guard-regions-skip-collapse-test-when-thp-not-enabled +++ a/tools/testing/selftests/mm/guard-regions.c @@ -21,6 +21,7 @@ #include #include #include "vm_util.h" +#include "thp_settings.h" #include "../pidfd/pidfd.h" @@ -2195,6 +2196,9 @@ TEST_F(guard_regions, collapse) char *ptr; int i; + if (!thp_available()) + SKIP(return, "Transparent Hugepages not available\n"); + /* Need file to be correct size for tests for non-anon. */ if (variant->backing != ANON_BACKED) ASSERT_EQ(ftruncate(self->fd, size), 0); _ Patches currently in -mm which might be from chuhu@redhat.com are selftests-mm-guard-regions-skip-collapse-test-when-thp-not-enabled.patch selftests-mm-soft-dirty-skip-two-tests-when-thp-is-not-available.patch selftests-mm-move-write_file-helper-to-vm_util.patch selftests-ksft_exit_fail_perror-support-printf-style-arguments.patch selftests-mm-vm_util-robust-write_file.patch selftests-mm-split_huge_page_test-skip-the-test-when-thp-is-not-available.patch selftests-mm-transhuge_stress-skip-the-test-when-thp-not-available.patch