Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 459CC39281F; Sat, 12 Sep 2026 13:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789219159; cv=none; b=RCtS6hBZMd8QFcdqHt7rO+1st1/hLUpRhb8jpDUeu0bYT5oVoedPHafwZbx4K+qR+Zy7w+ZHWz9q8kp8BZi8Fj1qxFIuv5hE8OGkC1fzM9dQbTybKSOWHiywnH1h3tqIl1u9TpDTB+aHprPLxCB2uJ+VkqbSc7Hm3JzbM8le6ow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789219159; c=relaxed/simple; bh=atubWGniKhhJs88Vsa13F+fsFdJQv2QpjXrB9Tg5tXI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=akki6OwNzDryCQ3HXoktsYOrtSjvhHuwGrzDN1JM8nGicVOtrrwbiQyUuVgFlgZu9NOMN9l2Au3Fjc9f9CZObGlWDuEQLmCMPvRMTqNtoYzBtT4mF6qm1iPijJKpNL/DwA8UHfNgvDvVlPct4yLKq52SZNcqZULSHi09NfjzQ7E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EzmIUM9q; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EzmIUM9q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5B571F000FF; Sat, 12 Sep 2026 13:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789219158; bh=a6WOW92Qk+zIIAuYh9OKdMwjhF/QSYxLnawP1x71/UQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EzmIUM9qVUew8UBv3O2fpuje5RpHurTxFv3szC6b2Go1qGoTKaw6Hl8oo6PbWxYze QJV1b4ghtqCljdAYxy+SEsd00lSo8ms+mwdgUCOR71+RVthYlXazWO55WKE5eyiIsV hVO3OULG0xRwfNIoAMBS/iq2J/XKagyjef06uvhw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Muhammad Usama Anjum , Sarthak Sharma , Usama Arif , "David Hildenbrand (Arm)" , Baolin Wang , Barry Song , Dev Jain , Lance Yang , "Liam R. Howlett" , Lorenzo Stoakes , Miaohe Lin , Michal Hocko , Mike Rapoport , Naoya Horiguchi , Nico Pache , Ryan Roberts , Shuah Khan , Suren Baghdasaryan , Vlastimil Babka , Zi Yan , Andrew Morton , Sasha Levin Subject: [PATCH 6.12 1292/1376] selftests/mm: skip COW tmpfile cases when fallocate() is unsupported Date: Sat, 12 Sep 2026 09:01:58 +0200 Message-ID: <20260912065636.331499036@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Muhammad Usama Anjum [ Upstream commit 4004c130c358b1561a55323b0e747f20f5133f7b ] Patch series "selftests/mm: Handle unsupported and transient test conditions", v3. Several MM selftests report failures when the test environment lacks an underlying prerequisite, such as fallocate() support, MADV_REMOVE, local page-cache semantics, or swap. This series converts those unsupported cases to SKIP while preserving failures for unexpected errors. It also allows migration tests to retry transient move_pages() failures. This patch (of 4): The tmpfile-backed COW cases allocate a one-page file with fallocate() before exercising private and shared mappings. When the filesystem backing tmpfile() does not implement fallocate(), setup fails with EOPNOTSUPP and no COW behavior is exercised. This occurs when the temporary directory resides on a filesystem with limited allocation support, such as NFSv3. Reporting a failure adds noise because the test prerequisite is absent rather than the COW implementation being broken. Report EOPNOTSUPP as a skip. Continue treating every other fallocate() error as a failure so unexpected setup regressions remain visible. Link: https://lore.kernel.org/20260727095225.372655-1-usama.anjum@arm.com Link: https://lore.kernel.org/20260727095225.372655-2-usama.anjum@arm.com Fixes: f8664f3c4a08 ("selftests/vm: cow: basic COW tests for non-anonymous pages") Signed-off-by: Muhammad Usama Anjum Tested-by: Sarthak Sharma Acked-by: Usama Arif Acked-by: David Hildenbrand (Arm) Cc: Baolin Wang Cc: Barry Song Cc: Dev Jain Cc: Lance Yang Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Miaohe Lin Cc: Michal Hocko Cc: Mike Rapoport Cc: Naoya Horiguchi Cc: Nico Pache Cc: Ryan Roberts Cc: Shuah Khan Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- tools/testing/selftests/mm/cow.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index d0e11a40269ea..c0ca9483c448a 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -1717,8 +1717,13 @@ static void run_with_tmpfile(non_anon_test_fn fn, const char *desc) /* File consists of a single page filled with zeroes. */ if (fallocate(fd, 0, 0, pagesize)) { - ksft_perror("fallocate() failed"); - log_test_result(KSFT_FAIL); + if (errno == EOPNOTSUPP) { + ksft_print_msg("fallocate() not supported by filesystem\n"); + log_test_result(KSFT_SKIP); + } else { + ksft_perror("fallocate() failed"); + log_test_result(KSFT_FAIL); + } goto close; } -- 2.53.0