From 809e18e2bf2b7ed8fe0de49c2dc297de558d0f7d Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Tue, 22 Feb 2022 18:04:30 +0100 Subject: [PATCH] testsolv: show an error if the testcase could not be written --- tools/testsolv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/testsolv.c b/tools/testsolv.c index a9e67ec7..9d5d28b9 100644 --- a/tools/testsolv.c +++ b/tools/testsolv.c @@ -298,7 +298,13 @@ main(int argc, char **argv) { int pcnt = solver_solve(solv, &job); if (writetestcase) - testcase_write(solv, writetestcase, resultflags, 0, 0); + { + if (!testcase_write(solv, writetestcase, resultflags, 0, 0)) + { + fprintf(stderr, "Could not write testcase: %s\n", pool_errstr(pool)); + exit(1); + } + } if (pcnt && solq.count) { int i, taken = 0; -- 2.47.2