ARM-software / optimized-routines

Optimized implementations of various library functions for ARM architecture processors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mathtest exits success even if tests failed

enh-google opened this issue · comments

it would be helpful for external test runners if mathtest returned failure if any tests failed:

diff --git a/math/test/mathtest.c b/math/test/mathtest.c
index 6ea3953..fe25773 100644
--- a/math/test/mathtest.c
+++ b/math/test/mathtest.c
@@ -1677,10 +1677,12 @@ int main(int ac, char **av) {
     if (declined)
         printf(" plus %d declined", declined);
     printf(")\n");
-    if (0 < passed && failed == 0)
+    if (0 < passed && failed == 0) {
         printf("** TEST PASSED OK **\n");
+        return 0;
+    }
 
-    return 0;
+    return 1;
 }
 
 void undef_func() {

note that i cannot accept contributions currently without copyright assignment because this repo has code we want to upstream into projects that require copyright assignment (although not the test code) i.e. all files have "(c) Arm" and not "(c) Arm & contributors".

but i can fix the bug independently (small changes like that are probably not relevant for copyright anyway).

i can update the readme to describe how to get the legals sorted out if you plan to submit patches.

(yeah, the current text in the readme was sufficiently "go away" that i thought i'd just inline the obvious one/two-line fixes into the bug reports as the clearest way to report the bug, and let you re-do the fixes...)