From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: aviv.daum@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fat: add KUnit tests for timestamp conversion helpers
Date: Mon, 16 Mar 2026 02:38:32 +0900 [thread overview]
Message-ID: <87ms09ro13.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20260315144212.24325-1-aviv.daum@gmail.com>
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 <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2026-03-15 17:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-15 14:42 [PATCH] fat: add KUnit tests for timestamp conversion helpers aviv.daum
2026-03-15 17:38 ` OGAWA Hirofumi [this message]
2026-03-15 22:24 ` [PATCH v2] " aviv.daum
2026-03-16 3:25 ` OGAWA Hirofumi
2026-03-24 7:19 ` OGAWA Hirofumi
2026-03-24 7:48 ` Christian Brauner
2026-03-24 8:02 ` OGAWA Hirofumi
2026-03-24 7:47 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ms09ro13.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=aviv.daum@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.