#include <errno.h>
#include <string.h>
#include <stdint.h>
+#include <pthread.h>
+#include <semaphore.h>
-#include "../src/common/include/rmr.h"
-#include "../src/common/include/rmr_agnostic.h"
+#include "rmr.h"
+#include "rmr_agnostic.h"
/*
Generate a simple route table (for all but direct route table testing).
ctx->max_plen = RMR_MAX_RCV_BYTES + sizeof( uta_mhdr_t );
ctx->max_mlen = ctx->max_plen + sizeof( uta_mhdr_t );
ctx->my_name = strdup( "dummy-test" );
+ ctx->my_ip = strdup( "30.4.19.86:1111" );
uta_lookup_rtg( ctx );
gen_rt( ctx ); // forces a static load with some known info since we don't start the rtc()
mbuf = rmr_rcv_msg( ctx, NULL );
}
- size = 2048 - sizeof( uta_mhdr_t ); // emulated nng receive allocates 2K payloads
+ size = 2048 - em_hdr_size(); // emulated nng receive allocates 2K buffers -- subtract off header size
state = rmr_payload_size( mbuf );
errors += fail_not_equal( state, size, "payload size didn't return expected value" ); // receive should always give 4k buffer
rtc( NULL ); // coverage test with nil pointer
rtc( ctx );
-
return !!errors;
}