From 176e38bd5876bfe691d09d75de8959801eda9da2 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Mon, 14 Jan 2013 14:35:49 +0100 Subject: Include PID info in test failures Useful for correlating test failures to events in traces. --- include/tests.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/tests.h b/include/tests.h index ed2b409..4ca21f8 100644 --- a/include/tests.h +++ b/include/tests.h @@ -7,8 +7,11 @@ #define fail(fmt, args...) \ do { \ - fprintf(stderr, "\n!! TEST FAILURE " fmt "\n at %s:%d (%s)\n", \ - ## args, __FILE__, __LINE__, __FUNCTION__); \ + fprintf(stderr, "\n!! TEST FAILURE " fmt \ + "\n at %s:%d (%s)" \ + "\n in task PID=%d\n", \ + ## args, __FILE__, __LINE__, __FUNCTION__, \ + getpid()); \ fflush(stderr); \ exit(200); \ } while (0) -- cgit v1.2.2