io: Do not skip timestamps tests for 32-bit time_t
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 12 Jul 2021 20:35:06 +0000 (17:35 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 4 Oct 2021 13:51:55 +0000 (10:51 -0300)
The first test in the set do not require 64-bit time_t support, so there
is no need to return UNSUPPORTED for the whole test.  The patch also adds
another test with arbitrary date prior y2038.

Checked on x86_64-linux-gnu and i686-linux-gnu.

io/tst-utimensat-skeleton.c

index ad9f676..2b956f1 100644 (file)
@@ -30,6 +30,8 @@ const static struct {
   int64_t v1;
   int64_t v2;
 } tests[] = {
+  /* Some arbitrary date before Y2038.  */
+  { 0x60ECA720LL, 0x60eca721LL },
   /* Y2038 threshold minus 2 and 1 seconds.  */
   { 0x7FFFFFFELL, 0x7FFFFFFFLL },
   /* Y2038 threshold plus 1 and 2 seconds.  */
@@ -59,7 +61,7 @@ do_prepare (int argc, char *argv[])
 static int
 do_test (void)
 {
-  if (!support_path_support_time64 (testfile))
+  if (sizeof (time_t) == 8 && !support_path_support_time64 (testfile))
     FAIL_UNSUPPORTED ("File %s does not support 64-bit timestamps",
                      testfile);