Remove NNG libraries from packages
The default build process will no longer include the NNG
libraries (librmr_nng.*) by default. It is still possible
to enable them with a CMake build flag (-DBUILD_NNG=1).
The NNG specific unit tests have been disabled.
Some SI95 specific unit tests have been enhanced in an effort
to work toward full coverage of the SI95 code.
This change is in a major version bump as the package contents
change. However, there is NOT an API change; all existing
applications will be able to use the new version without any
modification (other than possibly removing references to the
NNG based libraries).
Issue-ID: RIC-337
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: Ic9854b1ffc1e82c765692a11724d8086d24cceed
diff --git a/test/si95_test.c b/test/si95_test.c
index c77f389..fd6dd56 100644
--- a/test/si95_test.c
+++ b/test/si95_test.c
@@ -21,7 +21,7 @@
/*
Mmemonic: si95_test.c
Abstract: This is the main driver to test the si95 core functions
- (within rmr/src/si/src/si95).
+ (within rmr/src/si/src/si95).
Author: E. Scott Daniels
Date: 6 March 2018
@@ -58,7 +58,7 @@
#define DEBUG 1
// specific test tools in this directory
-#undef NNG_UNDER_TEST // NNG is NOT under test so undefine if set
+#undef NNG_UNDER_TEST // NNG is NOT under test so undefine if set
#define NO_EMULATION 1 // no emulation of transport functions
#define NO_PRIVATE_HEADERS 1 // no rmr_si or rmr_nng headers
#define NO_DUMMY_RMR 1 // no msg things
@@ -127,7 +127,7 @@
((struct tp_blk *)ptr)->squeue = iptr;
SItrash( TP_BLK, ptr );
}
-
+
ptr = SInew( GI_BLK );
errors += fail_if_nil( ptr, "memory: sinew returned nil when given giblk request" );
SItrash( GI_BLK, ptr ); // GI block cannot be trashed, ensure this (valgind will complain about a leak)
@@ -155,7 +155,7 @@
static int cleanup() {
int errors = 0;
-
+
if( ! si_ctx ) {
return 0;
}
@@ -163,8 +163,9 @@
SItp_stats( si_ctx ); // drive for coverage only
SItp_stats( NULL );
- SIconnect( si_ctx, "localhost:43086" ); // ensure context has a tp block to free on shutdown
- SIshutdown( si_ctx );
+ SIconnect( si_ctx, "localhost:43086" ); // ensure context has a tp block to free on shutdown
+ SIshutdown( NULL );
+ SIabort( si_ctx );
fprintf( stderr, "<INFO> cleanup module finished with %d errors\n", errors );
@@ -194,9 +195,8 @@
l = SIaddress( buf1, (void **) &dest, AC_TOADDR6 );
errors += fail_if_true( l > 0, "to addr6 with bad addr convdersion returned valid len" );
- snprintf( buf1, sizeof( buf1 ), "[ff02::5]:4002" ); // v6 might not be supported so failure is OK here
+ snprintf( buf1, sizeof( buf1 ), "[ff02::5]:4002" ); // v6 might not be supported so failure is OK here; driving for coverage
l=SIaddress( buf1, (void **) &dest, AC_TOADDR6 );
- errors += fail_if_true( l < 1, "to addr convdersion failed" );
snprintf( buf1, sizeof( buf1 ), "localhost:43086" );
l = SIaddress( buf1, (void **) &dest, AC_TOADDR );
@@ -222,11 +222,11 @@
state = SIconnect( si_ctx, "localhost:4567" ); // driver regular connect
errors += fail_if_true( state < 0, "connect to low port failed" );
- state = SIconnect( si_ctx, "localhost:43086" ); // drive save connect with good return code
+ state = SIconnect( si_ctx, "localhost:43086" ); // drive save connect with good return code
errors += fail_if_true( state < 0, "connect to high port failed" );
tpem_set_addr_dup_state( 1 ); // force get sockket name emulation to return a duplicate address
- state = SIconnect( si_ctx, "localhost:43086" ); // drive save connect with good return code
+ state = SIconnect( si_ctx, "localhost:43086" ); // drive save connect with good return code
errors += fail_if_true( state >= 0, "forced dup connect did not return error" );
tpem_set_addr_dup_state( 0 ); // force get sockket name emulation to return a duplicate address