X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Frt_static_test.c;h=9559004d06dab3cf55f6928964b6ecb14bf1b65b;hb=bf897297010df539909b7638d96557d41fd217b0;hp=ae9709b50b1a8ccb9402523fd398d306b6bf2a82;hpb=0b79fc264eea2591ad6f645d0c90cc378ea5603b;p=ric-plt%2Flib%2Frmr.git diff --git a/test/rt_static_test.c b/test/rt_static_test.c index ae9709b..9559004 100644 --- a/test/rt_static_test.c +++ b/test/rt_static_test.c @@ -379,13 +379,14 @@ static int rt_test( ) { mbuf->len = 100; rmr_str2meid( mbuf, "meid1" ); // id that we know is in the map + ep = NULL; // force to nil so we see it go non-nil state = epsock_meid( ctx->rtable, mbuf, &nn_sock, &ep ); errors += fail_if_nil( ep, "ep was nil when looking up ep with known meid in message" ); errors += fail_not_equal( state, 1, "state was not true when looking up ep with known meid in message" ); rmr_str2meid( mbuf, "XXXmeid1" ); // id that we know is NOT in the map state = epsock_meid( ctx->rtable, mbuf, &nn_sock, &ep ); - errors += fail_not_nil( ep, "ep was NOT nil when looking ep up with unknown meid in message" ); + // it is NOT a valid check to test ep for nil -- epsock_mied doesn't guarentee ep is set/cleared when state is false errors += fail_not_equal( state, 0, "state was not false when looking up ep with unknown meid in message" ); return !!errors; // 1 or 0 regardless of count