[PATCH 2/4] tests/xstatx.c: fix stat syscall tests on mips64

James Cowgill james410 at cowgill.org.uk
Thu Aug 11 09:44:26 UTC 2016


On 11/08/16 03:24, Dmitry V. Levin wrote:
> On Wed, Aug 10, 2016 at 11:38:43AM +0100, James Cowgill wrote:
>> For historical reasons the kernel struct stat represents times as unsigned
>> 32-bit integers on mips64. Therefore, while it's possible to give a file a
>> timestamp before 1970 with futimens, reading the same timestamp through
>> struct stat will give a positive time (around 2106).
>> Workaround by using positive timestamps for testing on mips64.
> 
> Does it meand that strace also should print a positive time on mips64?

Yes, any files with negative timestamps stored in the filesystem will
appear to have positive timestamps between 2038 and 2106 on mips64. This
affects all programs and not just strace. The bug requires lots of work
(new syscalls) to fix properly and I'm not sure it's worth it.

James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160811/2fed1f01/attachment.bin>


More information about the Strace-devel mailing list