X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fsr_si_static_test.c;h=b86ab891cdff10b2f896151d0d68e1e77edfe815;hb=11838bcf76f3614384459cb56e2ce80dea788cef;hp=be99359fa29cb099cb2342c744f7c5575ee728c4;hpb=9c923bcc9322c22220b574671c7b46f10008c614;p=ric-plt%2Flib%2Frmr.git diff --git a/test/sr_si_static_test.c b/test/sr_si_static_test.c index be99359..b86ab89 100644 --- a/test/sr_si_static_test.c +++ b/test/sr_si_static_test.c @@ -1,8 +1,8 @@ // : vi ts=4 sw=4 noet : /* ================================================================================== - Copyright (c) 2020 Nokia - Copyright (c) 2020 AT&T Intellectual Property. + Copyright (c) 2020-2021 Nokia + Copyright (c) 2020-2021 AT&T Intellectual Property. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -82,7 +82,6 @@ static int sr_si_test() { 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() gen_rt( ctx ); // force a second load to test cloning @@ -147,6 +146,10 @@ static int sr_si_test() { rtc_file( NULL ); // the static file only collector rtc_file( ctx ); + setenv( "RMR_RTREQ_FREQ", "400", 1 ); // force error checking code in rtc to resort to default + rtc( ctx ); + + setenv( "RMR_CTL_PORT", "43086", 1 ); // force defined branch in rtc rtc( ctx ); setenv( "RMR_RTG_SVC", "4567", 1 ); // drive for edge case coverage to ensure no nil pointer etc @@ -268,5 +271,12 @@ static int sr_si_test() { errors += fail_not_equal( strncmp( payload_str, mbuf->payload, strlen( payload_str )), 0, "realloc payload (clone+nocopy) validation of unchanged payload fails" ); - return !!errors; + // ---------------------- misc coverage tests; nothing to verify other than they don't crash ----------------------- + payload_str = strdup( "The Marching 110 will play the OU fightsong after every touchdown or field goal; it is a common sound echoing from Peden Stadium in the fall." ); + + dump_n( payload_str, "A dump", strlen( payload_str ) ); + dump_40( payload_str, "another dump" ); + + return errors; + }