diff options
author | Iurii Zaikin <yzaikin@google.com> | 2019-11-27 10:55:24 -0800 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2019-12-09 11:15:44 -0700 |
commit | 39101b2265440dfe83646a4bfc33015c86f36d71 (patch) | |
tree | b17da3c0936ded489efb051ec31adf135e700d3a /crypto/asymmetric_keys | |
parent | 8ef1ec0ca32c6f8a87f5b4c24b1db26da67c5609 (diff) | |
download | linux-39101b2265440dfe83646a4bfc33015c86f36d71.tar.gz linux-39101b2265440dfe83646a4bfc33015c86f36d71.tar.bz2 linux-39101b2265440dfe83646a4bfc33015c86f36d71.zip |
fs/ext4/inode-test: Fix inode test on 32 bit platforms.
Fixes the issue caused by the fact that in C in the expression
of the form -1234L only 1234L is the actual literal, the unary
minus is an operation applied to the literal. Which means that
to express the lower bound for the type one has to negate the
upper bound and subtract 1.
Original error:
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
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
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
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Iurii Zaikin <yzaikin@google.com>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'crypto/asymmetric_keys')
0 files changed, 0 insertions, 0 deletions