Hi Lurii,
On Tue, Nov 26, 2019 at 3:12 AM Linux Kernel Mailing List linux-kernel@vger.kernel.org wrote:
Commit: 1cbeab1b242d16fdb22dc3dab6a7d6afe746ae6d Parent: d460623c5fa126dc51bb2571dd7714ca75b0116c Refname: refs/heads/master Web: https://git.kernel.org/torvalds/c/1cbeab1b242d16fdb22dc3dab6a7d6afe746ae6d Author: Iurii Zaikin yzaikin@google.com AuthorDate: Thu Oct 17 15:12:33 2019 -0700 Committer: Shuah Khan skhan@linuxfoundation.org CommitDate: Wed Oct 23 10:28:23 2019 -0600
ext4: add kunit test for decoding extended timestamps KUnit tests for decoding extended 64 bit timestamps that verify the seconds part of [a/c/m] timestamps in ext4 inode structs are decoded correctly. Test data is derived from the table in the Inode Timestamps section of Documentation/filesystems/ext4/inodes.rst. KUnit tests run during boot and output the results to the debug log in TAP format (http://testanything.org/). Only useful for kernel devs running KUnit test harness and are not for inclusion into a production build. Signed-off-by: Iurii Zaikin <yzaikin@google.com> Reviewed-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Tested-by: Brendan Higgins <brendanhiggins@google.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
While this test succeeds on arm64, it fails on m68k and arm32 (presumably all 32-bit platforms?):
# Subtest: ext4_inode_test 1..1 # inode_test_xtimestamp_decoding: EXPECTATION FAILED at fs/ext4/inode-test.c:250 Expected test_data[i].expected.tv_sec == timestamp.tv_sec, but test_data[i].expected.tv_sec == -2147483648 timestamp.tv_sec == 2147483648 1901-12-13 Lower bound of 32bit < 0 timestamp, no extra bits: msb:1 lower_bound:1 extra_bits: 0 # inode_test_xtimestamp_decoding: EXPECTATION FAILED at fs/ext4/inode-test.c:250 Expected test_data[i].expected.tv_sec == timestamp.tv_sec, but test_data[i].expected.tv_sec == 2147483648 timestamp.tv_sec == 6442450944 2038-01-19 Lower bound of 32bit <0 timestamp, lo extra sec bit on: msb:1 lower_bound:1 extra_bits: 1 # inode_test_xtimestamp_decoding: EXPECTATION FAILED at fs/ext4/inode-test.c:250 Expected test_data[i].expected.tv_sec == timestamp.tv_sec, but test_data[i].expected.tv_sec == 6442450944 timestamp.tv_sec == 10737418240 2174-02-25 Lower bound of 32bit <0 timestamp, hi extra sec bit on: msb:1 lower_bound:1 extra_bits: 2 not ok 1 - inode_test_xtimestamp_decoding not ok 1 - ext4_inode_test
Gr{oetje,eeting}s,
Geert