Address potential error state after good send
This change addresses the potential to "hide" the good
status of a send in the case where there are multiple
round-robin groups for a message type. The send algorithm
was modified to eliminate the potential edge case and
to report a successful result if the message was accepted
for delivery to at least one group.
Two issues identified by valgrind (use of a potentially
uninitialised variable in a jump) were also corrected.
Intermediate commits:
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Add error tag to msg
Missing ERR on failure message.
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Prevent NPE in symtab
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Adjust unit tests, fix valgrind inddicated issues
Unit tests were added to verify the new get rte function.
Valgrind indicated several places where a conditional was
using a potentially uninitialised variable; these were fixed.
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I7c0a49713ab3d6fbb8f66e3d286049762433dc58
diff --git a/test/rmr_nng_test.c b/test/rmr_nng_test.c
index c9d9a6a..fb12ec2 100644
--- a/test/rmr_nng_test.c
+++ b/test/rmr_nng_test.c
@@ -96,46 +96,46 @@
int main() {
int errors = 0;
- fprintf( stderr, "<INFO> starting tool tests\n" );
+ fprintf( stderr, "\n<INFO> starting tool tests\n" );
errors += tools_test();
fprintf( stderr, "<INFO> error count: %d\n", errors );
- fprintf( stderr, "<INFO> starting ring tests (%d)\n", errors );
+ fprintf( stderr, "\n<INFO> starting ring tests (%d)\n", errors );
errors += ring_test();
fprintf( stderr, "<INFO> error count: %d\n", errors );
- fprintf( stderr, "<INFO> starting symtab tests\n" );
+ fprintf( stderr, "\n<INFO> starting symtab tests\n" );
errors += symtab_test( );
fprintf( stderr, "<INFO> error count: %d\n", errors );
- fprintf( stderr, "<INFO> starting rtable tests\n" );
+ fprintf( stderr, "\n<INFO> starting rtable tests\n" );
errors += rt_test(); // route table tests
fprintf( stderr, "<INFO> error count: %d\n", errors );
- fprintf( stderr, "<INFO> starting RMr API tests\n" );
+ fprintf( stderr, "\n<INFO> starting RMr API tests\n" );
errors += rmr_api_test();
- fprintf( stderr, "<INFO> run RMr API tests with src name only env var set\n" );
+ fprintf( stderr, "\n<INFO> run RMr API tests with src name only env var set\n" );
setenv( "RMR_SRC_NAMEONLY", "1", 1 );
errors += rmr_api_test();
fprintf( stderr, "<INFO> error count: %d\n", errors );
- fprintf( stderr, "<INFO> starting wormhole tests\n" );
+ fprintf( stderr, "\n<INFO> starting wormhole tests\n" );
errors += worm_test(); // test wormhole funcitons
fprintf( stderr, "<INFO> error count: %d\n", errors );
- fprintf( stderr, "<INFO> starting send/receive tests\n" );
+ fprintf( stderr, "\n<INFO> starting send/receive tests\n" );
errors += sr_nng_test(); // test the send/receive static functions
fprintf( stderr, "<INFO> error count: %d\n", errors );
- fprintf( stderr, "<INFO> starting mbuf api tests\n" );
+ fprintf( stderr, "\n<INFO> starting mbuf api tests\n" );
errors += mbuf_api_test( );
fprintf( stderr, "<INFO> error count: %d\n", errors );
if( errors == 0 ) {
- fprintf( stderr, "<PASS> all tests were OK\n" );
+ fprintf( stderr, "<PASS> all tests were OK\n\n" );
} else {
- fprintf( stderr, "<FAIL> %d modules reported errors\n", errors );
+ fprintf( stderr, "<FAIL> %d modules reported errors\n\n", errors );
}
return !!errors;