[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssl-dev
Subject:    [openssl-dev] Test coverage report + small patch
From:       Harri Porten <porten () froglogic ! com>
Date:       2015-04-30 14:50:52
Message-ID: alpine.DEB.2.11.1504301604060.26933 () greco ! froglogic ! com
[Download RAW message or body]

Hi!

In case you are interested in seeing the condition/decision source code 
coverage as achieved through the OpenSSL test suite:

  http://www.opencoverage.net/projects/openssl/index_html/sources.html

We now regularly generate the reports from the tip of the master branch. 
In the hope that it'll be useful for those touching and wanting to know 
how well it is tested.

Condition/decision coverage uncovers test combinations normally hidden in 
line or statement coverage. Hence the much lower result of 29.6%. A long 
way to go still :}

Please let us know if you notice that we should extend the build or test 
configuration to enable or run more components of the code.

Some of the dead code findings may be harmless. Still, changes like the 
attached one for b_sock.c will fix cases like
http://www.opencoverage.net/projects/openssl/index_html/source_565.html#line688 
and make the code more understandable at the same time. Maybe it's even an 
unwanted leftover?

Harri.

["b_sock.diff" (TEXT/x-diff)]

diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index a4fded5..986d657 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -684,7 +684,7 @@ int BIO_accept(int sock, char **addr)
         BIO_snprintf(*addr, nl, "%s:%s", h, s);
         goto end;
     } while (0);
-# endif
+# else
     if (sa.from.sa.sa_family != AF_INET)
         goto end;
     l = ntohl(sa.from.sa_in.sin_addr.s_addr);
@@ -701,6 +701,7 @@ int BIO_accept(int sock, char **addr)
                  (unsigned char)(l >> 16L) & 0xff,
                  (unsigned char)(l >> 8L) & 0xff,
                  (unsigned char)(l) & 0xff, port);
+# endif
  end:
     return (ret);
 }


_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic