Code

src/utils_latency_test.c: Assure that large latency values also work.
authorFlorian Forster <octo@collectd.org>
Wed, 15 Jul 2015 08:30:25 +0000 (10:30 +0200)
committerFlorian Forster <octo@collectd.org>
Wed, 15 Jul 2015 08:30:25 +0000 (10:30 +0200)
The cdtime_t representation of 99s doesn't fit into 32bit anymore, thereby
assuring that cdtime_t is actually 64bit on platforms that currently
don't pass the test, i.e. EPEL {5,6} on i386.

Issue: #1139

src/utils_latency_test.c

index 9b954e0d7ad0469ed79ca5d37b50a39f7254a22b..658b53c018159a167dc894e249f6ce80291d41af 100644 (file)
@@ -41,12 +41,13 @@ DEF_TEST(simple)
     double sum;
     double avg;
   } cases[] = {
-  /* val  min  max  sum  avg */
-    {0.5, 0.5, 0.5, 0.5, 0.5},
-    {0.3, 0.3, 0.5, 0.8, 0.4},
-    {0.7, 0.3, 0.7, 1.5, 0.5},
-    {2.5, 0.3, 2.5, 4.0, 1.0},
-    { -1, 0.3, 2.5, 4.0, 1.0},
+  /* val  min  max  sum   avg */
+    {0.5, 0.5, 0.5, 0.5,  0.5},
+    {0.3, 0.3, 0.5, 0.8,  0.4},
+    {0.7, 0.3, 0.7, 1.5,  0.5},
+    {2.5, 0.3, 2.5, 4.0,  1.0},
+    { 99, 0.3,  99, 103, 20.6},
+    { -1, 0.3,  99, 103, 20.6},
   };
   size_t i;
   latency_counter_t *l;