[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getloadavg test
From: |
Bruno Haible |
Subject: |
Re: getloadavg test |
Date: |
Tue, 15 Feb 2011 11:47:44 +0100 |
User-agent: |
KMail/1.9.9 |
Hi Paul,
> Move test code to ...
> * tests/test-getloadavg.c: New file, containing previous
> contents of test from lib/getloadavg.c.
> * modules/getloadavg-tests: New file.
This test can be run in two modes:
- simple test: call getloadavg once, and print one line.
- repeated test: call getloadavg repeatedly, every couple of seconds, in an
endless loop.
Whereas the unit tests in gnulib usually don't print anything when nothing is
wrong. (Because otherwise the "make check" output would take so much time to
understand, and obscure the failures.)
So, I would find it useful to
- change the test so that when it is run without arguments, it calls
getloadavg and does only some plausibility checks but without printing
anything in the normal case,
- add comments indicating that the program can also be used as a manual
test, and how to invoke it in this case. It would be overkill to add a
--help processing to it, but 2-3 lines of comments seem useful.
Bruno
--
In memoriam Matija Gubec <http://en.wikipedia.org/wiki/Matija_Gubec>
Re: getloadavg and errno, Bruno Haible, 2011/02/15
Re: getloadavg on Solaris 2.6, Bruno Haible, 2011/02/17