From ba1468e4c66a3f6d5eef2f8ad67188805d07c9b6 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 3 Feb 2017 04:23:46 +0100 Subject: [PATCH] vty tests: testBSCreload: ipa_handle_small: ensure rx of 4 bytes Change-Id: I995b7aba9d0b51b0861a4281dbbca888f36e9e00 --- openbsc/tests/vty_test_runner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 3fbe20d09..64fd86dc6 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -1239,6 +1239,8 @@ def nat_msc_test(x, ip, port, verbose = False): 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?"