[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFd5g44z0v5ULZeNDb=GgdaMaBO8wTCoUCp6fv0fnWEzRZuRmw@mail.gmail.com>
Date: Mon, 2 Dec 2019 08:18:32 -0800
From: Brendan Higgins <brendanhiggins@...gle.com>
To: Iurii Zaikin <yzaikin@...gle.com>
Cc: Shuah Khan <skhan@...uxfoundation.org>,
"Theodore Ts'o" <tytso@....edu>, geert@...ux-m68k.org,
linux-ext4@...r.kernel.org,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
KUnit Development <kunit-dev@...glegroups.com>
Subject: Re: [PATCH] fs/ext4/inode-test: Fix inode test on 32 bit platforms.
On Wed, Nov 27, 2019 at 10:55 AM Iurii Zaikin <yzaikin@...gle.com> wrote:
>
> 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@...ux-m68k.org>
> Signed-off-by: Iurii Zaikin <yzaikin@...gle.com>
> Tested-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Acked-by: Brendan Higgins <brendanhiggins@...gle.com>
Thanks for taking care of this so quickly!
Powered by blists - more mailing lists