mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
Fix timespec_from_nsec test for 32-bit time_t
Since struct timespec's tv_sec member is of type time_t, adjust the
expected value to allow for the truncation which will occur with 32-bit
time_t.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit dd1dba80b9)
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2043
This commit is contained in:
parent
aab604398d
commit
13768f3714
1 changed files with 1 additions and 1 deletions
|
|
@ -206,7 +206,7 @@ TEST(timespec_test, timespec_from_nsec)
|
|||
|
||||
timespec_from_nsec(&a, UINT64_MAX);
|
||||
EXPECT_EQ(a.tv_nsec, UINT64_MAX % NSEC_PER_SEC);
|
||||
EXPECT_EQ(a.tv_sec, UINT64_MAX / NSEC_PER_SEC);
|
||||
EXPECT_EQ(a.tv_sec, (time_t)(UINT64_MAX / NSEC_PER_SEC));
|
||||
}
|
||||
|
||||
TEST(timespec_test, timespec_from_usec)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue