[S] Change in osmo-ttcn3-hacks[master]: pgw: Avoid access to unbound global variable
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31592 ) Change subject: pgw: Avoid access to unbound global variable ...................................................................... pgw: Avoid access to unbound global variable This happens if GTv2C failed prior: """ 11:30:17.577738 15 PGW_Tests.ttcn:645 setverdict(fail): none -> fail reason: "Unexpected GTPv2 while waiting for CreateSessionResp", new component reason: "Une xpected GTPv2 while waiting for CreateSessionResp" 11:30:17.578004 15 PGW_Tests.ttcn:756 Dynamic test case error: Initializing a TTCN_Buffer with an unbound octetstring value. """ Change-Id: I9731b755ddc7bb3ebd56bdec550961cc36f2e2c6 --- M pgw/PGW_Tests.ttcn 1 file changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/92/31592/1 diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index b8c363b..8a25ebf 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -753,6 +753,10 @@ private function f_ping4(charstring host, integer interval := 1, integer count := 10) runs on PGW_Session_CT { var charstring ping :="ping -c " & int2str(count) & " -i " & int2str(interval); + + if (not isbound(g_ip4_addr)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "f_ping4(): g_ip4_addr is unset!"); + } ping := ping & " -I " & f_inet_ntoa(g_ip4_addr); ping := ping & " " & host; f_start_prog_wait(ping, tout := int2float(5 + interval*count)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31592 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9731b755ddc7bb3ebd56bdec550961cc36f2e2c6 Gerrit-Change-Number: 31592 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
pespin