From: Michael Tremer Date: Sat, 1 May 2021 16:59:11 +0000 (+0000) Subject: testsuite: Show when errno is unintentionally set X-Git-Tag: 0.9.28~1285^2~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48067a071d4a922d6ccdb1a3cae6fcab9eb06a16;p=pakfire.git testsuite: Show when errno is unintentionally set Signed-off-by: Michael Tremer --- diff --git a/tests/testsuite.h b/tests/testsuite.h index b56e0e6f4..e6617228d 100644 --- a/tests/testsuite.h +++ b/tests/testsuite.h @@ -80,6 +80,10 @@ int testsuite_run(); __FILE__, __LINE__, __PRETTY_FUNCTION__); \ return EXIT_FAILURE; \ } \ + if (errno) { \ + LOG_ERROR("errno is unexpectedly set: %s\n", strerror(errno)); \ + return EXIT_FAILURE; \ + } \ } while (0) #define ASSERT_FAILURE(expr) \