* tests/test-getloadavg.c (check_avg): Print a warning when the value
is improbable.
+2011-02-17 Bruno Haible <bruno@clisp.org>
+
+ getloadavg test: Add some plausibility checks.
+ * tests/test-getloadavg.c (check_avg): Print a warning when the value
+ is improbable.
+
2011-02-16 Eric Blake <eblake@redhat.com>
maintainer-makefile: make syntax-check a no-op from tarballs
{
if (printit)
printf ("%d-minute: %f ", minutes, avg);
+ else
+ {
+ /* Plausibility checks. */
+ if (avg < 0.01)
+ printf ("suspiciously low %d-minute average: %f\n", minutes, avg);
+ if (avg > 1000000)
+ printf ("suspiciously high %d-minute average: %f\n", minutes, avg);
+ }
if (avg < 0 || avg != avg)
exit (minutes);
}