]> git.ipfire.org Git - pakfire.git/commitdiff
testsuite: Show when errno is unintentionally set
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 May 2021 16:59:11 +0000 (16:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 May 2021 16:59:11 +0000 (16:59 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/testsuite.h

index b56e0e6f4b5224c65ed266408cf1832bbac41130..e6617228d77f755171b06b0881c55f60dea6d760 100644 (file)
@@ -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) \