From: Andrew Morton Subject: selftests/mm/memory-failure: skip poisoned dirty page-cache on NILFS2 Date: Mon, 23 Nov 2026 23:18:44 -0800 nilfs_sync_file() does not check the mapping error recorded when a dirty page-cache page is hard-poisoned, so fsync() returns 0. Skip only this NILFS2 case until fsync() reports EIO. The other NILFS2 page-cache tests still run. On NILFS2 under x86_64 QEMU, the combined selftest reported 9 passes and 1 skip. Signed-off-by: Andrew Morton Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: David Hildenbrand Cc: Liam R. Howlett Cc: Vlastimil Babka Cc: Mike Rapoport Cc: Michal Hocko Cc: Shuah Khan Cc: Muhammad Usama Anjum Cc: Ryusuke Konishi Cc: Amir Goldstein Cc: Eugenio Pérez Cc: German Maglione Cc: Kurt Lin Cc: Miklos Szeredi Cc: Stefan Hajnoczi Cc: Vivek Goyal tools/testing/selftests/mm/memory-failure.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/tools/testing/selftests/mm/memory-failure.c~selftests-mm-check-that-fsync-reports-hard-poisoned-dirty-page-cache-fix-1 +++ a/tools/testing/selftests/mm/memory-failure.c @@ -380,6 +380,14 @@ TEST_F(memory_failure, dirty_pagecache) close(fd); SKIP(return, "unsupported filesystem :%x\n", fs_type); } + /* + * nilfs2 does not check the mapping error in nilfs_sync_file(). + * Remove this skip when its fsync() reports poisoned dirty data. + */ + if (fs_type == NILFS_SUPER_MAGIC && variant->type == MADV_HARD) { + close(fd); + SKIP(return, "nilfs2 fsync() does not report poisoned dirty data\n"); + } addr = mmap(0, self->page_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); _