[MERGED] openbsc[master]: vty tests: testBSCreload: ipa_handle_small: ensure rx of 4 b...

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Feb 3 04:26:28 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: vty tests: testBSCreload: ipa_handle_small: ensure rx of 4 bytes
......................................................................


vty tests: testBSCreload: ipa_handle_small: ensure rx of 4 bytes

Change-Id: I995b7aba9d0b51b0861a4281dbbca888f36e9e00
---
M openbsc/tests/vty_test_runner.py
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 3fbe20d..64fd86d 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -1239,6 +1239,8 @@
 
 def ipa_handle_small(x, verbose = False):
     s = data2str(x.recv(4))
+    if len(s) != 4*2:
+      raise Exception("expected to receive 4 bytes, but got %d (%r)" % (len(s)/2, s))
     if "0001fe00" == s:
         if (verbose):
             print "\tBSC <- NAT: PING?"

-- 
To view, visit https://gerrit.osmocom.org/1736
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I995b7aba9d0b51b0861a4281dbbca888f36e9e00
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list