From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 A542B28725F for ; Sun, 3 May 2026 16:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777825256; cv=none; b=mhkA49FLJlLmPTvEdi2lbsmjGM6C+Z9hWwPpgMlTxK9Y54/EELZajTPrk8cXtMSkahzcO+neb3YhUvNQYq04FH8b3BJS4MORsK7Eaxw9Adsg6qw/bSpPo0TliOjOSYVITGSuABiif6IZ/Wsyo2SCZL6WEm+2/OkpKjZQhkOiQaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777825256; c=relaxed/simple; bh=VLshLWJJK65teNG0JdD2OGbZvRJMdCfLmf1TzG+rByU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r3Nvtki//gPz27o+nUTGYtVgs5M9B+tZlQLEdnUw6pbsaKbAV/+lqoQkKqz8RsTnEXJkM0oPDo5YmtDXJgLsYM56i8s33HbSOfgXeuFhV8AwJ/JTZtIEZIjK43RvOFx8SE0DTMKM2syN+sr5qvyt8baIDwoS/bM8VHVYTSUCvV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=Eyxy+T/Z; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Eyxy+T/Z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1777825252; bh=VLshLWJJK65teNG0JdD2OGbZvRJMdCfLmf1TzG+rByU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Eyxy+T/Z1xttXnbQwzBlMt5dcv2Zzk7ya1x9b8vLlxyBdewnLQ0yJ1sp7wlc2c/on GL8P26JkJaD6+3kd688E6Ou+tnj4e6V0Nb2EttP6zKHLlEf5nD1G8ckOTycEM7AzE8 zb3x/oJlM+W4vguX8B+G6JZyo+v76aOLQfvPNmqg= Date: Sun, 3 May 2026 18:20:52 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Daniel Palmer Cc: w@1wt.eu, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] selftests/nolibc: Add a very basic test for fallocate() Message-ID: <46df454e-f5d4-41f5-b502-e730ab4a1ef7@t-8ch.de> References: <20260430164125.1106350-1-daniel@thingy.jp> <20260430164125.1106350-3-daniel@thingy.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260430164125.1106350-3-daniel@thingy.jp> On 2026-05-01 01:41:25+0900, Daniel Palmer wrote: > 1: Create a tmp file, fallocate() to make it a bit bigger, check the > size is what was expected. > > 2: Try to fallocate() (1 << 20), this should work. > > 3: Try to fallocate() (1 << 52), this should cause ENOSPC or EFBIG. > > 2 and 3 are basically to make sure if the offset or size are split > into a pair of registers for the syscall that we are passing them > the correct way around. > > sparc32 seems to return EOPNOTSUPP for fallocate() so skip the > test there. This is because the kernel created in our testsuite does not enable CONFIG_TMPFS, falling back to ramfs/rootfs for /tmp. We should gracefully handle EOPNOTSUPP from fallocate() but also enable CONFIG_TMPFS for our test kernels to increase the test coverage. > Signed-off-by: Daniel Palmer > --- > tools/testing/selftests/nolibc/nolibc-test.c | 69 ++++++++++++++++++++ > 1 file changed, 69 insertions(+) > > diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c > index 08610cacf030..a586e9d9ede2 100644 (...)