unit1399: add logging to time comparison
authorDaniel Stenberg <daniel@haxx.se>
Sat, 1 Jul 2017 14:40:51 +0000 (16:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 1 Jul 2017 14:41:29 +0000 (16:41 +0200)
... to enable tracking down why autobuilds fail on this

Bug: #1616

tests/unit/unit1399.c

index 1befc8aafe8c476328e0dcae12a5daaa58e8069f..b733c8fd80c7f68faaac58a09322ce103440ff84 100644 (file)
@@ -39,7 +39,11 @@ static void unit_stop(void)
 static bool usec_matches_seconds(time_t time_usec, int expected_seconds)
 {
   int time_sec = (int)(time_usec / usec_magnitude);
-  return time_sec == expected_seconds;
+  bool same = (time_sec == expected_seconds);
+  fprintf(stderr, "is %d us same as %d seconds? %s\n",
+          (int)time_usec, expected_seconds,
+          same?"Yes":"No");
+  return same;
 }
 
 UNITTEST_START