From 1f5aa311429e04562fdd6f01f12ae76cd9dbae9b Mon Sep 17 00:00:00 2001 From: Branden Archer Date: Fri, 12 May 2017 21:43:37 -0400 Subject: [PATCH] Update 'no messaging setup' message It was found that if a ck_assert() or ck_abort() call was made when not running a test with srunner_run() that the current process would attempt to report a test failure to the process which started the test, of which none exists. As a result, finding no pipe file setup, the process aborts. This is all due to an API usage mistake, as ck_assert* and ck_abort() should not be called outside of a test or setup/teardown function. To make it more clear that if one hits this it is a API usage issue, changing the failure message which is reported. --- src/check_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check_msg.c b/src/check_msg.c index 9483654..56b9785 100644 --- a/src/check_msg.c +++ b/src/check_msg.c @@ -77,7 +77,7 @@ static FILE *get_pipe(void) return send_file1; } - eprintf("No messaging setup", __FILE__, __LINE__); + eprintf("Unable to report test progress or a failure; was an ck_assert or ck_abort function called while not running tests?", __FILE__, __LINE__); return NULL; } -- 2.50.1