From: Michael Schroeder Date: Tue, 22 Feb 2022 17:04:30 +0000 (+0100) Subject: testsolv: show an error if the testcase could not be written X-Git-Tag: 0.7.21~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=809e18e2bf2b7ed8fe0de49c2dc297de558d0f7d;p=thirdparty%2Flibsolv.git testsolv: show an error if the testcase could not be written --- 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;