On 02/22/2016 07:59 AM, Alex Bennée wrote: > When debugging stuff that occurs over several forks it would be useful > not to keep overwriting the one logfile you've set-up. This allows a > simple %d to be included once in the logfile parameter which is > substituted with getpid(). > > As the test cases involve checking user output they need > g_test_trap_subprocess() support. As a result they are currently skipped > on Travis builds due to the older glib involved. > > Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > Reviewed-by: Leandro Dorileo <l...@dorileo.org> > Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> > > --- > v5 > - add another r-b > v7 > - simpler error check as suggested by Eric Blake > - don't g_error, just error_report (so we don't crash from monitor) > - add some unit tests > --- > tests/test-logging.c | 39 +++++++++++++++++++++++++++++++++++++++ > util/log.c | 22 ++++++++++++++++++++-- > 2 files changed, 59 insertions(+), 2 deletions(-)
Reviewed-by: Richard Henderson <r...@twiddle.net> r~