s4/torture: fix a timestamps test to work on ext filesystem
commitbe695ae6e0e6f428771f80ac4a8d389db31e4598
authorRalph Boehme <slow@samba.org>
Tue, 10 Mar 2020 17:26:49 +0000 (10 18:26 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 7 Apr 2020 08:12:32 +0000 (7 08:12 +0000)
tree63b9bba1273d2bbb9131032e609b56817e1e4d26
parenta3157b958bfd9f1f77014fcfc6ca5ad1f38b0fbf
s4/torture: fix a timestamps test to work on ext filesystem

ext filesystem has a time_t limit of 15032385535 (0x0x37fffffff). From
Documentation/filesystems/ext4/inodes.rst:

  If the inode structure size ``sb->s_inode_size`` is larger than 128 bytes and
  the ``i_inode_extra`` field is large enough to encompass the respective
  ``i_[cma]time_extra`` field, the ctime, atime, and mtime inode fields are
  widened to 64 bits. Within this “extra” 32-bit field, the lower two bits are
  used to extend the 32-bit seconds field to be 34 bit wide; the upper 30 bits
  are used to provide nanosecond timestamp accuracy. Therefore, timestamps
  should not overflow until May 2446. ...

Changing the test to use the value 0x37fffffff instead of 100000000000 allows
running the test locally on ext filesytems.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 73fedf014bbe02a408360d48e35bce4a6dbc9c36)
source4/torture/smb2/timestamps.c