zmike pushed a commit to branch efl-1.22.

http://git.enlightenment.org/core/efl.git/commit/?id=1e63da75d6f3feb01b3ebb1171ef642b94d2f200

commit 1e63da75d6f3feb01b3ebb1171ef642b94d2f200
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sun Apr 7 14:47:35 2019 +0100

    tests - remove one of the eina strtod tests as libc is failing
    
    see the comments above the test explaining why it's removed (libc
    fails, not eina and having our tests fail because eina is a bit more
    robust than libc is not a sane thing to have). but here is the comment
    for git history spelunking:
    
    this test isn't viable because libc actually fails the conversion (testing
    glibc 2.28 on arch linux). either libc doesn't like the space at the start
    thus doesn't skip it but assumes END of numbver string thus not converting
    and returning NULL, or it doesn't like InFiNiTyfoo in some way, but either
    way this test shows eina to be more robust and do some kind of conversion
    and libc to fail and return NULL from strtod into the string pointer. it
    also doesnt return an infinite fp thus hitting the default: case and thus
    failing etc. ... so all in all remove the test as all it does it cause
    failures and if anything shows libc to be failing more than eina.
    
    @fix
---
 src/tests/eina/eina_test_convert.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/tests/eina/eina_test_convert.c 
b/src/tests/eina/eina_test_convert.c
index be8aea3942..0824d86656 100644
--- a/src/tests/eina/eina_test_convert.c
+++ b/src/tests/eina/eina_test_convert.c
@@ -189,10 +189,10 @@ _eina_convert_strtod_c_check(const char *str)
                (fpclassify(d1) != FP_NORMAL));
        if (!EINA_DBL_EQ(d1,d2) || (e1 != e2))
          {
-            printf("  FP_NORMAL\n");
-            printf("  ERR: %s, %s\n", str, strerror(errno));
-            printf("    E1 **%.6f**, **%g**, %s\n", d1, d1, e1 ? e1 : "");
-            printf("    E2 **%.6f**, **%g**, %s\n", d2, d2, e2 ? e2 : "");
+            fprintf(stderr, "  FP_NORMAL\n");
+            fprintf(stderr, "  ERR: %s, %s\n", str, strerror(errno));
+            fprintf(stderr, "    E1 **%.6f**, **%g**, %s\n", d1, d1, e1 ? e1 : 
"");
+            fprintf(stderr, "    E2 **%.6f**, **%g**, %s\n", d2, d2, e2 ? e2 : 
"");
             if (!EINA_DBL_EQ(d1,d2)) printf("different value\n");
             if (e1 != e2) printf("different end position\n");
          }
@@ -250,7 +250,16 @@ EFL_START_TEST(eina_convert_strtod_c_simple)
    _eina_convert_strtod_c_check("2.2250738585072014e-308");
    _eina_convert_strtod_c_check(" NaNfoo");
    _eina_convert_strtod_c_check(" -INFfoo");
-   _eina_convert_strtod_c_check("  InFiNiTyfoo");
+// this test isn't viable because libc actually fails the conversion (testing
+// glibc 2.28 on arch linux). either libc doesn't like the space at the start
+// thus doesn't skip it but assumes END of numbver string thus not converting
+// and returning NULL, or it doesn't like InFiNiTyfoo in some way, but either
+// way this test shows eina to be more robust and do some kind of conversion
+// and libc to fail and return NULL from strtod into the string pointer. it
+// also doesnt return an infinite fp thus hitting the default: case and thus
+// failing etc. ... so all in all remove the test as all it does it cause
+// failures and if anything shows libc to be failing more than eina.
+//   _eina_convert_strtod_c_check("  InFiNiTyfoo");
    setlocale(LC_ALL, old);
 }
 EFL_END_TEST

-- 


Reply via email to