tinytest_main() returns 0 on success, -1 on errors and 1 on test failures. So test.c should check on !=0 instead of <0.
@@ -1196,7 +1196,7 @@ main(int c, const char **v)
atexit(remove_directory);
- have_failed = (tinytest_main(c, v, testgroups) < 0);
+ have_failed = (tinytest_main(c, v, testgroups) != 0);
free_pregenerated_keys();
#ifdef USE_DMALLOC