The patch titled Subject: selftests/mm: skip map_populate on weird filesystems has been added to the -mm mm-unstable branch. Its filename is selftests-mm-skip-map_populate-on-weird-filesystems.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-skip-map_populate-on-weird-filesystems.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 the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Brendan Jackman <jackmanb@xxxxxxxxxx> Subject: selftests/mm: skip map_populate on weird filesystems Date: Fri, 21 Feb 2025 18:25:47 +0000 It seems that 9pfs does not allow truncating unlinked files, Mark Brown has noted that NFS may also behave this way. It doesn't seem quite right to call this a "bug" but it's probably a special enough case that it makes sense for the test to just SKIP if it happens. Link: https://lkml.kernel.org/r/20250221-mm-selftests-v2-8-28c4d66383c5@xxxxxxxxxx Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx> Cc: Dev Jain <dev.jain@xxxxxxx> Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx> Cc: Mateusz Guzik <mjguzik@xxxxxxxxx> Cc: Shuah Khan (Samsung OSG) <shuah@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/mm/map_populate.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/tools/testing/selftests/mm/map_populate.c~selftests-mm-skip-map_populate-on-weird-filesystems +++ a/tools/testing/selftests/mm/map_populate.c @@ -87,6 +87,13 @@ int main(int argc, char **argv) BUG_ON(!ftmp, "tmpfile()"); ret = ftruncate(fileno(ftmp), MMAP_SZ); + if (ret < 0 && errno == ENOENT) { + /* + * This probably means tmpfile() made a file on a filesystem + * that doesn't handle temporary files the way we want. + */ + ksft_exit_skip("ftruncate(fileno(tmpfile())) gave ENOENT, weird filesystem?"); + } BUG_ON(ret, "ftruncate()"); smap = mmap(0, MMAP_SZ, PROT_READ | PROT_WRITE, _ Patches currently in -mm which might be from jackmanb@xxxxxxxxxx are mm-mmu_gather-update-comment-on-rcu-freeing.patch selftests-mm-report-errno-when-things-fail-in-gup_longterm.patch selftests-mm-fix-assumption-that-sudo-is-present.patch selftests-mm-skip-uffd-stress-if-userfaultfd-not-available.patch selftests-mm-skip-uffd-wp-mremap-if-userfaultfd-not-available.patch selftests-mm-uffd-rename-nr_cpus-nr_threads.patch selftests-mm-print-some-details-when-uffd-stress-gets-bad-params.patch selftests-mm-dont-fail-uffd-stress-if-too-many-cpus.patch selftests-mm-skip-map_populate-on-weird-filesystems.patch selftests-mm-skip-gup_longerm-tests-on-weird-filesystems.patch