+
+ msg2 = rmr_alloc_msg( rmc, 1024 );
+ msg2 = rmr_rcv_msg( NULL, msg2 );
+ if( msg2 != NULL ) {
+ errors += fail_if( msg2->state == RMR_OK, "nil context check for rcv msg returned OK" );
+ }
+ msg2 = rmr_torcv_msg( NULL, msg2, 200 );
+ if( msg2 != NULL ) {
+ errors += fail_if( msg2->state == RMR_OK, "nil context check for torcv msg returned OK" );
+ }
+
+ // ----- thread start coverage ---------------------------------------------------------------------------
+ setenv( "RMR_WARNINGS", "1", 1 ); // force non-default branches during these tests
+ setenv( "RMR_SRC_NAMEONLY", "1", 1 );
+
+ rmr_init( ":6789", 1024, 0 ); // threaded mode with defined/default RM target
+ setenv( "RMR_RTG_SVC", "-1", 1 ); // force into static table mode
+ rmr_init( ":6789", 1024, 0 ); // threaded mode with static table
+
+
+ // ---- some things must be pushed specifically for edge cases and such ------------------------------------
+ errors += test_ep_counts();
+ init_err( "test error message", rmc, rmc2, ENOMEM ); // drive for coverage
+
+ ctx = mk_dummy_ctx();
+ ctx->river_hash = rmr_sym_alloc( 129 );
+
+ buf2mbuf( NULL, NULL, 0, 0 ); // things in mt_call_si_static
+
+ state = mt_data_cb( NULL, 0, "123", 3 );
+ errors += fail_not_equal( state, 0, "mt_data_cb didn't respond correctly when ctx is nil" );
+
+ state = mt_data_cb( ctx, -1, "123", 3 );
+ errors += fail_not_equal( state, 0, "mt_data_cb didn't respond correctly when ctx is nil" );
+
+ ctx->nrivers = 1;
+ state = mt_data_cb( ctx, 23, "123", 3 ); // force add river to hash reference
+ errors += fail_not_equal( state, 0, "mt_data_cb didn't respond correctly when ctx is nil" );
+
+ mt_disc_cb( NULL, 0 );
+ mt_disc_cb( ctx, 128 ); // for a FD we know isn't there
+
+
+ p = mt_receive( NULL );
+ errors += fail_not_nil( p, "mt_receive returned non-nil pointer when given nil context" );
+