From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) (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 98271125A9 for ; Sun, 15 Mar 2026 17:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.171.160.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773596748; cv=none; b=PwOESV6E6UaWFa8IZ16SWHRF5/fIiuyAGVwIn3usvbIfDQR9s1WmJfTcCJvAkPrf/NshbCp7jyVY+v3SLrI+s6LxeTXDHQEg0CcTI1HsunKltR5sazz5+6kVNvaH2pQgPCPOPGFHc47LtvQlf08fuLe4lpdehfs3vCqfVYbLrGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773596748; c=relaxed/simple; bh=zZ4hOAZd6Hiibo7k5tzHILsSy2I/8+2lNoU2cP8KASo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=UA+gFDfz9we4FutuQZfNPtacv2YtZGLqajbdBa/pZwXjYRnonpLI9G0DKITCKmqa/p2VgUyjK3CA9FFrpOwUiee2lEqMP7Y87HFmgNHdi/zbO0xK1jqRyVpiujaGibDTZBtOYaJwRL0csSwSspdWZU2zqAQ7xwMmkhhcmrw5JhY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mail.parknet.co.jp; spf=pass smtp.mailfrom=parknet.co.jp; dkim=pass (2048-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b=q2eYae4H; dkim=permerror (0-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b=wTTL8vYR; arc=none smtp.client-ip=210.171.160.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mail.parknet.co.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=parknet.co.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b="q2eYae4H"; dkim=permerror (0-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b="wTTL8vYR" Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id 80E9B2051576; Mon, 16 Mar 2026 02:38:33 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=parknet.co.jp; s=20250114; t=1773596313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y5A5ctWobEBDE/bEYOr8kPRbisF+EVs0/SVToZfXY2k=; b=q2eYae4H5Yu+olgOR8dwjjuvMQhXMzVz+0xcrLDow71Jb4ODnUaNKszFoN5kej7ZoM6sR8 R81CbqkjwkrOZhNO0emgiZ4uC98Ms1Kwe3OUvwOESovl9b1AbvAGkXLi9Up8jrCQ4BW985 f2/pBBEKj3iGeGDetnMNr54vgV12XxmuAGwP0rVfwQoAYTy4p9jGpIQPcc5OyiQ+CKzFmP 9njl+uAIh63mGv/OFb9eE4gfOXpj3bPXV+h4g3ARfPWbOnU5oZQ7jVGbCFuAa9vKWu4s5w Levns7k8gjvkuxQDHWb0M181G04yS9Xc04ySK6F2SkYAg4hrTB+01GopSyrPLw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=parknet.co.jp; s=20250114-ed25519; t=1773596313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y5A5ctWobEBDE/bEYOr8kPRbisF+EVs0/SVToZfXY2k=; b=wTTL8vYRiCOoo6U9xcBagy/g3AuCNYp4jhH9B2UAU0s9hF8sqwoCxpBUukT8ZQqinwS4G/ JcvcJNjNaJTaehDQ== Received: from devron.myhome.or.jp (devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (Postfix) with ESMTPS id 0AE52E0054E; Mon, 16 Mar 2026 02:38:33 +0900 (JST) Received: by devron.myhome.or.jp (Postfix, from userid 1000) id EBABB22001BB; Mon, 16 Mar 2026 02:38:32 +0900 (JST) From: OGAWA Hirofumi To: aviv.daum@gmail.com Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] fat: add KUnit tests for timestamp conversion helpers In-Reply-To: <20260315144212.24325-1-aviv.daum@gmail.com> References: <20260315144212.24325-1-aviv.daum@gmail.com> Date: Mon, 16 Mar 2026 02:38:32 +0900 Message-ID: <87ms09ro13.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain aviv.daum@gmail.com writes: > +static void fat_time_unix2fat_clamp_test(struct kunit *test) > +{ > + static struct msdos_sb_info fake_sb; > + __le16 date, time; > + u8 cs; > + struct fat_unix2fat_clamp_testcase *testcase = > + (struct fat_unix2fat_clamp_testcase *)test->param_value; > + > + fat_test_set_time_offset(&fake_sb, testcase->time_offset); > + > + fat_time_unix2fat(&fake_sb, &testcase->ts, &time, &date, &cs); > + KUNIT_EXPECT_EQ_MSG(test, > + le16_to_cpu(testcase->time), > + le16_to_cpu(time), > + "Clamped time mismatch\n"); > + KUNIT_EXPECT_EQ_MSG(test, > + le16_to_cpu(testcase->date), > + le16_to_cpu(date), > + "Clamped date mismatch\n"); It is unnecessary to convert to native endian? > + KUNIT_EXPECT_EQ_MSG(test, > + testcase->cs, > + cs, > + "Clamped centisecond mismatch\n"); > +} -- OGAWA Hirofumi