]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fat: add KUnit tests for timestamp conversion helpers
authoravivdaum <aviv.daum@gmail.com>
Sun, 15 Mar 2026 22:24:04 +0000 (00:24 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 24 Mar 2026 22:37:16 +0000 (23:37 +0100)
commit4bbf3f58e00f8671eb384c7df6983d803058b204
tree894c459d1dcf4f92fff3c4571ba40edc657c9d73
parent1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
fat: add KUnit tests for timestamp conversion helpers

Extend fat_test with coverage for FAT timestamp edge cases that are not
currently exercised.

Add tests for fat_time_unix2fat() clamping at the UTC boundaries and
when time_offset pushes an otherwise valid timestamp outside the FAT
date range. Also cover the NULL time_cs path used by existing callers,
and verify fat_truncate_atime() truncation across timezone offsets.

Link: https://patch.msgid.link/20260315222404.9678-1-aviv.daum@gmail.com
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: avivdaum <aviv.daum@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fat/fat_test.c
fs/fat/misc.c