Subject: Re: bug#8572: du/bigtime skip reason

From: Jim Meyering <[email-masked]>
Date: Thu, 28 Apr 2011 11:29:30 +0200

Bruno Haible wrote:
> building coreutils 8.12 on a Linux 2.6.25.20, glibc 2.8 machine, "make check"
> shows these lines in 32-bits only (not in 64-bit builds):
>
>   bigtime: skipped test: file system cannot represent big time stamps
>   SKIP: du/bigtime
>
> The message suggests that it's a problem with the file system. But then,
> why do I get the SKIP then in a 32-bit build and a PASS in a 64-bit build?
>
> The answer is that the behaviour of the 'touch' program depends on whether
> it is built in 32-bit mode or in 64-bit mode:
>
> $ ./coreutils-8.12-64bit/src/touch -d @922337203685477580 future; echo $?
> 0
>
> $ ./coreutils-8.12-32bit/src/touch -d @922337203685477580 future; echo $?
> ./coreutils-8.12-32bit/src/touch: invalid date format `@922337203685477580'
> 1
>
> I would argue that when entering a date, this should not happen. For numbers,
> ok, but here a number is meant to be converted to a date.

Hi Bruno,
That use of touch has to depend on the file system since it sets
stat.st_mtime and stat.st_atime.  On systems with 32-bit st_*time
fields, touch has to diagnose failures like the above when the
supplied value is too wide for a 32-bit slot.