Commit 96ed6a75 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/ci-improve-oai-ue-testing' into develop_integration_2019_w17

parents d312a9d7 4ecc3c1e
...@@ -629,27 +629,88 @@ class SSHConnection(): ...@@ -629,27 +629,88 @@ class SSHConnection():
# Launch UE with the modified config file # Launch UE with the modified config file
self.command('echo "ulimit -c unlimited && ./lte-uesoftmodem ' + self.Initialize_OAI_UE_args + '" > ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5) self.command('echo "ulimit -c unlimited && ./lte-uesoftmodem ' + self.Initialize_OAI_UE_args + '" > ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
self.command('chmod 775 ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5) self.command('chmod 775 ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
self.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log', '\$', 5)
self.command('echo ' + self.UEPassword + ' | sudo -S -E daemon --inherit --unsafe --name=ue' + str(self.UE_instance) + '_daemon --chdir=' + self.UESourceCodePath + '/cmake_targets/lte_build_oai/build -o ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
self.UELogFile = 'ue_' + self.testCase_id + '.log' self.UELogFile = 'ue_' + self.testCase_id + '.log'
time.sleep(6)
self.command('cd ../..', '\$', 5) # We are now looping several times to hope we really sync w/ an eNB
doLoop = True doOutterLoop = True
loopCounter = 10 outterLoopCounter = 5
while (doLoop): gotSyncStatus = True
loopCounter = loopCounter - 1 fullSyncStatus = True
if (loopCounter == 0): while (doOutterLoop):
sys.exit(1) self.command('cd ' + self.UESourceCodePath + '/cmake_targets/lte_build_oai/build', '\$', 5)
else: self.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log', '\$', 5)
self.command('echo ' + self.UEPassword + ' | sudo -S -E daemon --inherit --unsafe --name=ue' + str(self.UE_instance) + '_daemon --chdir=' + self.UESourceCodePath + '/cmake_targets/lte_build_oai/build -o ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
time.sleep(6)
self.command('cd ../..', '\$', 5)
doLoop = True
loopCounter = 10
gotSyncStatus = True
# the 'got sync' message is for the UE threads synchronization
while (doLoop):
loopCounter = loopCounter - 1
if (loopCounter == 0):
# Here should never occur
logging.error('"got sync" message never showed!')
gotSyncStatus = False
doLoop = False
continue
self.command('stdbuf -o0 cat ue_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync"', '\$', 4) self.command('stdbuf -o0 cat ue_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync"', '\$', 4)
result = re.search('got sync', str(self.ssh.before)) result = re.search('got sync', str(self.ssh.before))
if result is None: if result is None:
time.sleep(6) time.sleep(6)
else: else:
doLoop = False doLoop = False
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'OK', ALL_PROCESSES_OK, 'OAI UE') logging.debug('Found "got sync" message!')
logging.debug('\u001B[1m Initialize OAI UE Completed\u001B[0m') if gotSyncStatus == False:
# we certainly need to stop the lte-uesoftmodem process if it is still running!
self.command('ps -aux | grep --text --color=never softmodem | grep -v grep', '\$', 4)
result = re.search('lte-uesoftmodem', str(self.ssh.before))
if result is not None:
self.command('echo ' + self.UEPassword + ' | sudo -S killall --signal=SIGINT lte-uesoftmodem', '\$', 4)
time.sleep(3)
# We are now checking if sync w/ eNB DOES NOT OCCUR
# Usually during the cell synchronization stage, the UE returns with No cell synchronization message
doLoop = True
loopCounter = 10
while (doLoop):
loopCounter = loopCounter - 1
if (loopCounter == 0):
# Here we do have a great chance that the UE did cell-sync w/ eNB
doLoop = False
doOutterLoop = False
fullSyncStatus = True
continue
self.command('stdbuf -o0 cat ue_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync"', '\$', 4)
result = re.search('No cell synchronization found', str(self.ssh.before))
if result is None:
time.sleep(6)
else:
doLoop = False
fullSyncStatus = False
logging.debug('Found: "No cell synchronization" message! --> try again')
time.sleep(6)
self.command('ps -aux | grep --text --color=never softmodem | grep -v grep', '\$', 4)
result = re.search('lte-uesoftmodem', str(self.ssh.before))
if result is not None:
self.command('echo ' + self.UEPassword + ' | sudo -S killall --signal=SIGINT lte-uesoftmodem', '\$', 4)
outterLoopCounter = outterLoopCounter - 1
if (outterLoopCounter == 0):
doOutterLoop = False
if fullSyncStatus and gotSyncStatus:
result = re.search('--no-L2-connect', str(self.Initialize_OAI_UE_args))
if result is None:
self.command('ifconfig oaitun_ue1', '\$', 4)
result = re.search('inet addr', str(self.ssh.before))
if result is not None:
logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m')
else:
logging.error('\u001B[1m oaitun_ue1 interface is either NOT mounted or NOT configured\u001B[0m')
self.close() self.close()
# For the moment we are always OK!!!
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'OK', ALL_PROCESSES_OK, 'OAI UE')
logging.debug('\u001B[1m Initialize OAI UE Completed\u001B[0m')
def checkDevTTYisUnlocked(self): def checkDevTTYisUnlocked(self):
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
...@@ -827,24 +888,28 @@ class SSHConnection(): ...@@ -827,24 +888,28 @@ class SSHConnection():
if ping_status < 0: if ping_status < 0:
message = 'Ping with UE (' + str(moduleIPAddr) + ') crashed due to TIMEOUT!' message = 'Ping with UE (' + str(moduleIPAddr) + ') crashed due to TIMEOUT!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, moduleIPAddr, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, moduleIPAddr, device_id, statusQueue, message)
return return
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', str(self.ssh.before)) result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', str(self.ssh.before))
if result is None: if result is None:
message = 'Packet Loss Not Found!' message = 'Packet Loss Not Found!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, moduleIPAddr, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, moduleIPAddr, device_id, statusQueue, message)
return return
packetloss = result.group('packetloss') packetloss = result.group('packetloss')
if float(packetloss) == 100: if float(packetloss) == 100:
message = 'Packet Loss is 100%' message = 'Packet Loss is 100%'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, moduleIPAddr, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, moduleIPAddr, device_id, statusQueue, message)
return return
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', str(self.ssh.before)) result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', str(self.ssh.before))
if result is None: if result is None:
message = 'Ping RTT_Min RTT_Avg RTT_Max Not Found!' message = 'Ping RTT_Min RTT_Avg RTT_Max Not Found!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, moduleIPAddr, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, moduleIPAddr, device_id, statusQueue, message)
return return
rtt_min = result.group('rtt_min') rtt_min = result.group('rtt_min')
...@@ -1115,6 +1180,18 @@ class SSHConnection(): ...@@ -1115,6 +1180,18 @@ class SSHConnection():
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
ue_ip_status = 0 ue_ip_status = 0
self.UEIPAddresses = [] self.UEIPAddresses = []
if (len(self.UEDevices) == 1) and (self.UEDevices[0] == 'OAI-UE'):
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
Usage()
sys.exit('Insufficient Parameter')
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
self.command('ifconfig oaitun_ue1', '\$', 4)
result = re.search('inet addr:(?P<ueipaddress>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', str(self.ssh.before))
UE_IPAddress = result.group('ueipaddress')
logging.debug('\u001B[1mUE (' + self.UEDevices[0] + ') IP Address is ' + UE_IPAddress + '\u001B[0m')
self.UEIPAddresses.append(UE_IPAddress)
self.close()
return ue_ip_status
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
for device_id in self.UEDevices: for device_id in self.UEDevices:
count = 0 count = 0
...@@ -1160,24 +1237,28 @@ class SSHConnection(): ...@@ -1160,24 +1237,28 @@ class SSHConnection():
if ping_status < 0: if ping_status < 0:
message = 'Ping with UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT!' message = 'Ping with UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message)
return return
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', str(self.ssh.before)) result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', str(self.ssh.before))
if result is None: if result is None:
message = 'Packet Loss Not Found!' message = 'Packet Loss Not Found!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message)
return return
packetloss = result.group('packetloss') packetloss = result.group('packetloss')
if float(packetloss) == 100: if float(packetloss) == 100:
message = 'Packet Loss is 100%' message = 'Packet Loss is 100%'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message)
return return
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', str(self.ssh.before)) result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', str(self.ssh.before))
if result is None: if result is None:
message = 'Ping RTT_Min RTT_Avg RTT_Max Not Found!' message = 'Ping RTT_Min RTT_Avg RTT_Max Not Found!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message)
return return
rtt_min = result.group('rtt_min') rtt_min = result.group('rtt_min')
...@@ -1314,15 +1395,20 @@ class SSHConnection(): ...@@ -1314,15 +1395,20 @@ class SSHConnection():
Usage() Usage()
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
check_eNB = True check_eNB = True
check_OAI_UE = False if (len(self.UEDevices) == 1) and (self.UEDevices[0] == 'OAI-UE'):
check_OAI_UE = True
else:
check_OAI_UE = False
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE) pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE)
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) self.CreateHtmlTabFooter(False)
sys.exit(1) sys.exit(1)
ueIpStatus = self.GetAllUEIPAddresses() ueIpStatus = self.GetAllUEIPAddresses()
if (ueIpStatus < 0): if (ueIpStatus < 0):
self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE) self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE)
self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) self.CreateHtmlTabFooter(False)
sys.exit(1) sys.exit(1)
multi_jobs = [] multi_jobs = []
...@@ -1663,8 +1749,12 @@ class SSHConnection(): ...@@ -1663,8 +1749,12 @@ class SSHConnection():
self.close() self.close()
# Launch iperf client on UE # Launch iperf client on UE
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) if (device_id == 'OAI-UE'):
self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5) self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
self.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5)
else:
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5)
iperf_time = self.Iperf_ComputeTime() iperf_time = self.Iperf_ComputeTime()
time.sleep(0.5) time.sleep(0.5)
...@@ -1676,12 +1766,16 @@ class SSHConnection(): ...@@ -1676,12 +1766,16 @@ class SSHConnection():
time.sleep(0.5) time.sleep(0.5)
self.command('rm -f iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', 5) self.command('rm -f iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
iperf_status = self.command('stdbuf -o0 adb -s ' + device_id + ' shell "/data/local/tmp/iperf -c ' + EPC_Iperf_UE_IPAddress + ' ' + modified_options + ' -p ' + str(port) + '" 2>&1 | stdbuf -o0 tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0) if (device_id == 'OAI-UE'):
iperf_status = self.command('iperf -c ' + EPC_Iperf_UE_IPAddress + ' ' + modified_options + ' -p ' + str(port) + ' -B ' + UE_IPAddress + ' 2>&1 | stdbuf -o0 tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
else:
iperf_status = self.command('stdbuf -o0 adb -s ' + device_id + ' shell "/data/local/tmp/iperf -c ' + EPC_Iperf_UE_IPAddress + ' ' + modified_options + ' -p ' + str(port) + '" 2>&1 | stdbuf -o0 tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
# TIMEOUT Case # TIMEOUT Case
if iperf_status < 0: if iperf_status < 0:
self.close() self.close()
message = 'iperf on UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT !' message = 'iperf on UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT !'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.close()
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message)
return return
clientStatus = self.Iperf_analyzeV2Output(lock, UE_IPAddress, device_id, statusQueue, modified_options) clientStatus = self.Iperf_analyzeV2Output(lock, UE_IPAddress, device_id, statusQueue, modified_options)
...@@ -1698,6 +1792,10 @@ class SSHConnection(): ...@@ -1698,6 +1792,10 @@ class SSHConnection():
os.remove('iperf_server_' + self.testCase_id + '_' + device_id + '.log') os.remove('iperf_server_' + self.testCase_id + '_' + device_id + '.log')
self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, self.EPCSourceCodePath + '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.') self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, self.EPCSourceCodePath + '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options) self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options)
# in case of OAI-UE
if (device_id == 'OAI-UE'):
self.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/iperf_' + self.testCase_id + '_' + device_id + '.log', '.')
self.copyout(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, 'iperf_' + self.testCase_id + '_' + device_id + '.log', self.EPCSourceCodePath + '/scripts')
def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue): def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue):
try: try:
...@@ -1706,43 +1804,60 @@ class SSHConnection(): ...@@ -1706,43 +1804,60 @@ class SSHConnection():
return return
useIperf3 = False useIperf3 = False
udpIperf = True udpIperf = True
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) if (device_id != 'OAI-UE'):
# if by chance ADB server and EPC are on the same remote host, at least log collection will take care of it self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
self.command('if [ ! -d ' + self.EPCSourceCodePath + '/scripts ]; then mkdir -p ' + self.EPCSourceCodePath + '/scripts ; fi', '\$', 5) # if by chance ADB server and EPC are on the same remote host, at least log collection will take care of it
self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5) self.command('if [ ! -d ' + self.EPCSourceCodePath + '/scripts ]; then mkdir -p ' + self.EPCSourceCodePath + '/scripts ; fi', '\$', 5)
# Checking if iperf / iperf3 are installed self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5)
self.command('adb -s ' + device_id + ' shell "ls /data/local/tmp"', '\$', 5) # Checking if iperf / iperf3 are installed
result = re.search('iperf3', str(self.ssh.before)) self.command('adb -s ' + device_id + ' shell "ls /data/local/tmp"', '\$', 5)
if result is None: result = re.search('iperf3', str(self.ssh.before))
result = re.search('iperf', str(self.ssh.before))
if result is None: if result is None:
message = 'Neither iperf nor iperf3 installed on UE!' result = re.search('iperf', str(self.ssh.before))
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') if result is None:
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) message = 'Neither iperf nor iperf3 installed on UE!'
return logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
else: self.close()
useIperf3 = True self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message)
return
else:
useIperf3 = True
self.close()
# in case of iperf, UL has its own function # in case of iperf, UL has its own function
if (not useIperf3): if (not useIperf3):
result = re.search('-R', str(self.iperf_args)) result = re.search('-R', str(self.iperf_args))
if result is not None: if result is not None:
self.close()
self.Iperf_UL_common(lock, UE_IPAddress, device_id, idx, ue_num, statusQueue) self.Iperf_UL_common(lock, UE_IPAddress, device_id, idx, ue_num, statusQueue)
return return
if (useIperf3): # Launch the IPERF server on the UE side for DL
self.command('stdbuf -o0 adb -s ' + device_id + ' shell /data/local/tmp/iperf3 -s &', '\$', 5) if (device_id == 'OAI-UE'):
else: self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
self.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5)
self.command('rm -f iperf_server_' + self.testCase_id + '_' + device_id + '.log', '\$', 5) self.command('rm -f iperf_server_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
result = re.search('-u', str(self.iperf_args)) result = re.search('-u', str(self.iperf_args))
if result is None: if result is None:
self.command('echo $USER; nohup adb -s ' + device_id + ' shell "/data/local/tmp/iperf -s -i 1" > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', self.ADBUserName, 5) self.command('echo $USER; nohup iperf -B ' + UE_IPAddress + ' -s -i 1 > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', self.UEUserName, 5)
udpIperf = False udpIperf = False
else: else:
self.command('echo $USER; nohup adb -s ' + device_id + ' shell "/data/local/tmp/iperf -u -s -i 1" > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', self.ADBUserName, 5) self.command('echo $USER; nohup iperf -B ' + UE_IPAddress + ' -u -s -i 1 > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', self.UEUserName, 5)
else:
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5)
if (useIperf3):
self.command('stdbuf -o0 adb -s ' + device_id + ' shell /data/local/tmp/iperf3 -s &', '\$', 5)
else:
self.command('rm -f iperf_server_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
result = re.search('-u', str(self.iperf_args))
if result is None:
self.command('echo $USER; nohup adb -s ' + device_id + ' shell "/data/local/tmp/iperf -s -i 1" > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', self.ADBUserName, 5)
udpIperf = False
else:
self.command('echo $USER; nohup adb -s ' + device_id + ' shell "/data/local/tmp/iperf -u -s -i 1" > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', self.ADBUserName, 5)
time.sleep(0.5) time.sleep(0.5)
self.close() self.close()
# Launch the IPERF client on the EPC side for DL
self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword)
self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5) self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5)
iperf_time = self.Iperf_ComputeTime() iperf_time = self.Iperf_ComputeTime()
...@@ -1771,19 +1886,36 @@ class SSHConnection(): ...@@ -1771,19 +1886,36 @@ class SSHConnection():
clientStatus = self.Iperf_analyzeV2Output(lock, UE_IPAddress, device_id, statusQueue, modified_options) clientStatus = self.Iperf_analyzeV2Output(lock, UE_IPAddress, device_id, statusQueue, modified_options)
self.close() self.close()
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) # Kill the IPERF server that runs in background
self.command('stdbuf -o0 adb -s ' + device_id + ' shell ps | grep --color=never iperf | grep -v grep', '\$', 5) if (device_id == 'OAI-UE'):
result = re.search('shell +(?P<pid>\d+)', str(self.ssh.before)) self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
if result is not None: self.command('killall iperf', '\$', 5)
pid_iperf = result.group('pid') else:
self.command('stdbuf -o0 adb -s ' + device_id + ' shell kill -KILL ' + pid_iperf, '\$', 5) self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
self.command('stdbuf -o0 adb -s ' + device_id + ' shell ps | grep --color=never iperf | grep -v grep', '\$', 5)
result = re.search('shell +(?P<pid>\d+)', str(self.ssh.before))
if result is not None:
pid_iperf = result.group('pid')
self.command('stdbuf -o0 adb -s ' + device_id + ' shell kill -KILL ' + pid_iperf, '\$', 5)
self.close() self.close()
# if the client report is absent, try to analyze the server log file
if (clientStatus == -1): if (clientStatus == -1):
time.sleep(1) time.sleep(1)
if (os.path.isfile('iperf_server_' + self.testCase_id + '_' + device_id + '.log')): if (os.path.isfile('iperf_server_' + self.testCase_id + '_' + device_id + '.log')):
os.remove('iperf_server_' + self.testCase_id + '_' + device_id + '.log') os.remove('iperf_server_' + self.testCase_id + '_' + device_id + '.log')
self.copyin(self.ADBIPAddress, self.ADBUserName, self.ADBPassword, self.EPCSourceCodePath + '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.') if (device_id == 'OAI-UE'):
self.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
else:
self.copyin(self.ADBIPAddress, self.ADBUserName, self.ADBPassword, self.EPCSourceCodePath + '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options) self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options)
# in case of OAI UE:
if (device_id == 'OAI-UE'):
if (os.path.isfile('iperf_server_' + self.testCase_id + '_' + device_id + '.log')):
pass
else:
self.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
self.copyout(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, 'iperf_server_' + self.testCase_id + '_' + device_id + '.log', self.EPCSourceCodePath + '/scripts')
except: except:
os.kill(os.getppid(),signal.SIGUSR1) os.kill(os.getppid(),signal.SIGUSR1)
...@@ -1897,7 +2029,10 @@ class SSHConnection(): ...@@ -1897,7 +2029,10 @@ class SSHConnection():
Usage() Usage()
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
check_eNB = True check_eNB = True
check_OAI_UE = False if (len(self.UEDevices) == 1) and (self.UEDevices[0] == 'OAI-UE'):
check_OAI_UE = True
else:
check_OAI_UE = False
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE) pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE)
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>epc-closure</htmlTabRef>
<htmlTabName>EPC-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
050201 060201 070201
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="050201">
<class>Terminate_HSS</class>
<desc>Terminate HSS</desc>
</testCase>
<testCase id="060201">
<class>Terminate_MME</class>
<desc>Terminate MME</desc>
</testCase>
<testCase id="070201">
<class>Terminate_SPGW</class>
<desc>Terminate SPGW</desc>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>epc-start</htmlTabRef>
<htmlTabName>EPC-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
050101 060101 070101
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="050101">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="060101">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
<testCase id="070101">
<class>Initialize_SPGW</class>
<desc>Initialize SPGW</desc>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-05-tm1-tunnel</htmlTabRef>
<htmlTabName>Test-05MHz-TM1-tunnel</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
030102 000001 090102 000002 040503 000001 040603 040643 040644 000001 090109 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="030102">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="090102">
<class>Initialize_OAI_UE</class>
<desc>Initialize OAI UE (FDD/Band7/5MHz)</desc>
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 120 --ue-txgain 0 --ue-max-power 0 --ue-scan-carrier --nokrnmod 1</Initialize_OAI_UE_args>
</testCase>
<testCase id="090109">
<class>Terminate_OAI_UE</class>
<desc>Terminate OAI UE</desc>
</testCase>
<testCase id="040503">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040604">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1.2Mbps/UDP)(30 sec)</desc>
<iperf_args>-b 1.2M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040643">
<class>Iperf</class>
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040644">
<class>Iperf</class>
<desc>iperf (5MHz - UL/8Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 8M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
</testCaseList>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<testCase id="090110"> <testCase id="090110">
<class>Initialize_OAI_UE</class> <class>Initialize_OAI_UE</class>
<desc>Initialize OAI UE -- sniffing Orange frequency</desc> <desc>Initialize OAI UE -- sniffing Orange frequency</desc>
<Initialize_OAI_UE_args>-C 816000000 -r 50 --ue-rxgain 130 --ue-scan-carrier --no-L2-connect --nokrnmod 1</Initialize_OAI_UE_args> <Initialize_OAI_UE_args>-C 816000000 -r 50 --ue-rxgain 135 --ue-scan-carrier --no-L2-connect --nokrnmod 1</Initialize_OAI_UE_args>
</testCase> </testCase>
<testCase id="000001"> <testCase id="000001">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment