Fix rmr_rpobe command line bug; add test coverage
[ric-plt/lib/rmr.git] / test / test_support.c
index 9f8f00f..a8309d9 100644 (file)
@@ -159,6 +159,7 @@ static int fail_not_equal( int a, int b, char* what ) {
 }
 
 static int fail_if_equal( int a, int b, char* what ) {
+               fprintf( stderr, "<TESTING> %s %d\n", what, a==b );
        if( a == b ) {
                fprintf( stderr, "<FAIL> %s values were equal a=%d b=%d\n", what, a, b );
        }
@@ -197,6 +198,7 @@ static rmr_mbuf_t* test_mk_msg( int len, int tr_len ) {
        alen = sizeof( *hdr ) + tr_len + len + TP_HDR_LEN;      // this does no support allocating len2 and len3 data fields
 
        new_msg = (rmr_mbuf_t *) malloc( sizeof *new_msg );
+       memset( new_msg, 0, sizeof( *new_msg ) );
        new_msg->tp_buf = (void *) malloc( alen );
        memset( new_msg->tp_buf, 0, alen );