From ee5088f9b4cb7f35913022a93cd2aa6424d775ed Mon Sep 17 00:00:00 2001 From: Sye van der Veen Date: Sun, 14 Apr 2024 13:19:00 -0400 Subject: [PATCH] Ensure tests fail on stderr and pipe errors --- munit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/munit.c b/munit.c index 00ede07..dc72d3a 100644 --- a/munit.c +++ b/munit.c @@ -1334,6 +1334,7 @@ munit_test_runner_run_test_with_params(MunitTestRunner* runner, const MunitTest* #endif if (stderr_buf == NULL) { munit_log_errno(MUNIT_LOG_ERROR, stderr, "unable to create buffer for stderr"); + report.errored++; result = MUNIT_ERROR; goto print_result; } @@ -1344,6 +1345,7 @@ munit_test_runner_run_test_with_params(MunitTestRunner* runner, const MunitTest* pipefd[1] = -1; if (pipe(pipefd) != 0) { munit_log_errno(MUNIT_LOG_ERROR, stderr, "unable to create pipe"); + report.errored++; result = MUNIT_ERROR; goto print_result; }