|
|
|
@ -20,6 +20,13 @@ wait(ue.is_registered) |
|
|
|
|
print('UE is attached') |
|
|
|
|
|
|
|
|
|
proc = ue.run_netns_wait('ping', ('ping', '-c', '10', epc.tun_addr())) |
|
|
|
|
|
|
|
|
|
# Check zero lost pings |
|
|
|
|
num_sent = int([x for x in proc.get_stdout().split('\n') if x.find('packets transmitted') != -1][0].split(' ')[0]) |
|
|
|
|
num_received = int([x for x in proc.get_stdout().split('\n') if x.find('packets transmitted, ') != -1][0].split('packets transmitted, ')[1].split(' received')[0]) |
|
|
|
|
if num_received != num_sent: |
|
|
|
|
raise Exception("{}\n\nError: Detected {} lost pings".format(proc.get_stdout(), num_sent - num_received)) |
|
|
|
|
|
|
|
|
|
output = proc.get_stdout() |
|
|
|
|
print(output) |
|
|
|
|
test.set_report_stdout(output) |
|
|
|
|
test.set_report_stdout(output) |