From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (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 0C4403FCB13 for ; Mon, 27 Jul 2026 16:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785170770; cv=none; b=fmhZ1+c3EKNd6fl8GkOdk/5Fh9lDrazYHzGQFHGFo3hbWtX7a514PXYnwI0y6OxDv66bTaDbBUAHTDnHiAaV31Vtu4+rgxsu4FPRPkTQLSuvdfXefCBWXLWH+QzYgaBacuGoOmICm2bnpOIvKVn3stDak2WsQNlmev5J9fV2dg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785170770; c=relaxed/simple; bh=lYkxJURr4b8T5fcyUwFfj0VPmUSd++MvHLs+J+120Qk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kFrGtZkdHtwd+t6EFyaaLB94KOFs1jimLxYD/7kEXmiO3f+Rr5iHT0dKZPCGII8y56kAo5iNJWOLAuOh+SPIWA2uMP26/fTGGyjVERGyyQSCxqjQX7GiV52CYkZJC8ZUWC6imZrG6wMrAeUtx9Xv74AZm8sMYc5k02Zbqc0wMAI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ODMqdQgX; arc=none smtp.client-ip=95.215.58.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ODMqdQgX" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1785170756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sXIlDiKSKHoB5funfN0ip0RnphBZYOqvi0Mcm88qhBY=; b=ODMqdQgXDPCFb/Co71Ndjhz9dQ/CkLN9N0o+suX1dbw/g5gB0mLmJ6y+a38Gwo88Fqggcm qG1UUoTcn3phpNtrr/yVK+1mpXLMOSvcdhLB56AImA/annvY9vMmjJjdiHTTGQ18vOJbpF 4NjVfU/GWImgnrW/ICGjPEa0kAUiVuk= From: Usama Arif To: Muhammad Usama Anjum Cc: Usama Arif , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Shuah Khan , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Miaohe Lin , Naoya Horiguchi , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Sarthak Sharma Subject: Re: [PATCH v3 1/5] selftests/mm: skip COW tmpfile cases when fallocate() is unsupported Date: Mon, 27 Jul 2026 09:45:44 -0700 Message-ID: <20260727164545.897052-1-usama.arif@linux.dev> In-Reply-To: <20260727095225.372655-2-usama.anjum@arm.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On Mon, 27 Jul 2026 10:52:17 +0100 Muhammad Usama Anjum wrote: > 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. > > Tested-by: Sarthak Sharma > Signed-off-by: Muhammad Usama Anjum > --- > 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 0c627ea89ff7b..c1b8920e29342 100644 > --- a/tools/testing/selftests/mm/cow.c > +++ b/tools/testing/selftests/mm/cow.c > @@ -1718,8 +1718,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); > + } Correctly skips only unsupported fallocate() setup Acked-by: Usama Arif > goto close; > } > > -- > 2.47.3 > >