From 7878e102e029e747c6533f59cc0fedf244c7fd58 Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 9 Nov 2020 14:33:59 +0100 Subject: [PATCH 1/8] improving markers for NSA FR1 test --- ci-scripts/ran.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index d5906e9567..f1a4ab3690 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -705,6 +705,9 @@ class RANManagement(): systemTime = '' maxPhyMemUsage = '' nbContextSwitches = '' + #NSA FR1 + NSA_RAPROC_PUSCH_check = 0 + for line in enb_log_file.readlines(): # Runtime statistics result = re.search('Run time:' ,str(line)) @@ -855,12 +858,19 @@ class RANManagement(): result = re.search('MBMS USER-PLANE.*Requesting.*bytes from RLC', str(line)) if result is not None: mbmsRequestMsg += 1 + #FR1 NSA test : add new markers to make sure gNB is used + result = re.search('\[gNB [0-9]+\]\[RAPROC\] PUSCH with TC_RNTI [0-9a-fA-F]+ received correctly, adding UE MAC Context UE_id [0-9]+\/RNTI [0-9a-fA-F]+', str(line)) + if result is not None: + NSA_RAPROC_PUSCH_check = 1 + + enb_log_file.close() logging.debug(' File analysis completed') if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): nodeB_prefix = 'e' else: nodeB_prefix = 'g' + if self.air_interface[self.eNB_instance] == 'nr-softmodem': if ulschReceiveOK > 0: statMsg = nodeB_prefix + 'NB showed ' + str(ulschReceiveOK) + ' "ULSCH received ok" message(s)' @@ -874,6 +884,14 @@ class RANManagement(): statMsg = nodeB_prefix + 'NB ran with TX Write thread enabled' logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') htmleNBFailureMsg += statMsg + '\n' + #FR1 NSA test : add new markers to make sure gNB is used + if NSA_RAPROC_PUSCH_check: + statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS ' + else + statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL ' + logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + htmleNBFailureMsg += statMsg + '\n' + if uciStatMsgCount > 0: statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') From 7ce5aaa136af1fd02a4a58d98124ccebaa165c2c Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 9 Nov 2020 15:13:56 +0100 Subject: [PATCH 2/8] adding dlsch and ulsch statistics --- ci-scripts/ran.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index f1a4ab3690..9c2e2b423a 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -705,8 +705,10 @@ class RANManagement(): systemTime = '' maxPhyMemUsage = '' nbContextSwitches = '' - #NSA FR1 + #NSA FR1 check NSA_RAPROC_PUSCH_check = 0 + #dlsch and ulsch statistics (dictionary) + dlsch_ulsch_stats = {} for line in enb_log_file.readlines(): # Runtime statistics @@ -862,7 +864,15 @@ class RANManagement(): result = re.search('\[gNB [0-9]+\]\[RAPROC\] PUSCH with TC_RNTI [0-9a-fA-F]+ received correctly, adding UE MAC Context UE_id [0-9]+\/RNTI [0-9a-fA-F]+', str(line)) if result is not None: NSA_RAPROC_PUSCH_check = 1 - + #dlsch and ulsch statistics + #keys below are are the markers we are loooking for, looping over this keys list + #everytime these markers are found in the log file, the previous ones are overwritten in the dict + #eventually we record only the last one + keys = {'dlsch_rounds','dlsch_total_bytes','ulsch_rounds','ulsch_total_bytes_scheduled'} + for k in keys: + result = re.search(k, str(line)) + if result is not None: + dlsch_ulsch_stats[k]=str(line) enb_log_file.close() logging.debug(' File analysis completed') @@ -870,7 +880,7 @@ class RANManagement(): nodeB_prefix = 'e' else: nodeB_prefix = 'g' - + if self.air_interface[self.eNB_instance] == 'nr-softmodem': if ulschReceiveOK > 0: statMsg = nodeB_prefix + 'NB showed ' + str(ulschReceiveOK) + ' "ULSCH received ok" message(s)' @@ -890,7 +900,14 @@ class RANManagement(): else statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL ' logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') - htmleNBFailureMsg += statMsg + '\n' + htmleNBFailureMsg += statMsg + '\n' + #ulsch and dlsch statistics + if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty + statMsg='' + for key in dlsch_ulsch_stats: #for each dictionary key + statMsg += dlsch_ulsch_stats[key] + '\n' + logging.debug('\u001B[1;30;43m ' + dlsch_ulsch_stats[key] + ' \u001B[0m') + htmleNBFailureMsg += statMsg + '\n' if uciStatMsgCount > 0: statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' From e8aeccad9f9fc89706b5b51c276fbf8dce1900c2 Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 9 Nov 2020 15:45:09 +0100 Subject: [PATCH 3/8] fix typo --- ci-scripts/ran.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 9c2e2b423a..d38ce4df25 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -897,7 +897,7 @@ class RANManagement(): #FR1 NSA test : add new markers to make sure gNB is used if NSA_RAPROC_PUSCH_check: statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS ' - else + else: statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL ' logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') htmleNBFailureMsg += statMsg + '\n' From 9d3304059a55ad8247c729034e7439bf255f461e Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 9 Nov 2020 16:51:58 +0100 Subject: [PATCH 4/8] for debug --- ci-scripts/ran.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index d38ce4df25..a7c4b54458 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -876,6 +876,9 @@ class RANManagement(): enb_log_file.close() logging.debug(' File analysis completed') + #RH debug + print(self.air_interface[self.eNB_instance]+'\n') + # if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): nodeB_prefix = 'e' else: @@ -895,14 +898,14 @@ class RANManagement(): logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') htmleNBFailureMsg += statMsg + '\n' #FR1 NSA test : add new markers to make sure gNB is used - if NSA_RAPROC_PUSCH_check: + if NSA_RAPROC_PUSCH_check: statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS ' - else: + else: statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL ' logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') htmleNBFailureMsg += statMsg + '\n' #ulsch and dlsch statistics - if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty + if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty statMsg='' for key in dlsch_ulsch_stats: #for each dictionary key statMsg += dlsch_ulsch_stats[key] + '\n' From 789e48fcd29708abc2e93b8690aa8e7189506bcd Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Mon, 9 Nov 2020 17:50:34 +0100 Subject: [PATCH 5/8] debug --- ci-scripts/ran.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index a7c4b54458..050eb5bb0d 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -568,6 +568,10 @@ class RANManagement(): mySSH = SSH.SSHConnection() mySSH.open(lIpAddr, lUserName, lPassWord) mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5) + #RH debug + print(self.air_interface) + print(self.eNB_instance) + # if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): nodeB_prefix = 'e' else: @@ -877,7 +881,7 @@ class RANManagement(): enb_log_file.close() logging.debug(' File analysis completed') #RH debug - print(self.air_interface[self.eNB_instance]+'\n') + print(self.air_interface[self.eNB_instance]+'\n') # if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): nodeB_prefix = 'e' @@ -899,18 +903,18 @@ class RANManagement(): htmleNBFailureMsg += statMsg + '\n' #FR1 NSA test : add new markers to make sure gNB is used if NSA_RAPROC_PUSCH_check: - statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS ' + statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS ' else: - statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL ' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') - htmleNBFailureMsg += statMsg + '\n' - #ulsch and dlsch statistics + statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL ' + logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + htmleNBFailureMsg += statMsg + '\n' + #ulsch and dlsch statistics if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty - statMsg='' - for key in dlsch_ulsch_stats: #for each dictionary key - statMsg += dlsch_ulsch_stats[key] + '\n' - logging.debug('\u001B[1;30;43m ' + dlsch_ulsch_stats[key] + ' \u001B[0m') - htmleNBFailureMsg += statMsg + '\n' + statMsg='' + for key in dlsch_ulsch_stats: #for each dictionary key + statMsg += dlsch_ulsch_stats[key] + '\n' + logging.debug('\u001B[1;30;43m ' + dlsch_ulsch_stats[key] + ' \u001B[0m') + htmleNBFailureMsg += statMsg + '\n' if uciStatMsgCount > 0: statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' From 4353880dbdc6726bc09737721569d6bc402e5065 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Tue, 10 Nov 2020 16:53:01 +0100 Subject: [PATCH 6/8] gNB html + log update for nsa fr1 ok --- ci-scripts/ran.py | 49 +++++++++++------------- ci-scripts/xml_files/fr1_ran_ue_proc.xml | 6 ++- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 050eb5bb0d..32b2d7e919 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -133,7 +133,7 @@ class RANManagement(): self.air_interface[self.eNB_instance] = 'nr-softmodem' else: self.air_interface[self.eNB_instance] = 'lte-softmodem' - + # Worakround for some servers, we need to erase completely the workspace if self.Build_eNB_forced_workspace_cleanup: mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf ' + lSourcePath, '\$', 15) @@ -427,7 +427,7 @@ class RANManagement(): # Launch eNB with the modified config file mySSH.command('source oaienv', '\$', 5) mySSH.command('cd cmake_targets', '\$', 5) - if self.air_interface == 'nr': + if self.air_interface[self.eNB_instance] == 'nr-softmodem': mySSH.command('if [ -e rbconfig.raw ]; then echo ' + lPassWord + ' | sudo -S rm rbconfig.raw; fi', '\$', 5) mySSH.command('if [ -e reconfig.raw ]; then echo ' + lPassWord + ' | sudo -S rm reconfig.raw; fi', '\$', 5) # NOTE: WE SHALL do a check if the executable is present (in case build went wrong) @@ -568,10 +568,6 @@ class RANManagement(): mySSH = SSH.SSHConnection() mySSH.open(lIpAddr, lUserName, lPassWord) mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5) - #RH debug - print(self.air_interface) - print(self.eNB_instance) - # if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): nodeB_prefix = 'e' else: @@ -869,20 +865,17 @@ class RANManagement(): if result is not None: NSA_RAPROC_PUSCH_check = 1 #dlsch and ulsch statistics - #keys below are are the markers we are loooking for, looping over this keys list + #keys below are the markers we are loooking for, loop over this keys list #everytime these markers are found in the log file, the previous ones are overwritten in the dict - #eventually we record only the last one + #eventually we record only the last occurence keys = {'dlsch_rounds','dlsch_total_bytes','ulsch_rounds','ulsch_total_bytes_scheduled'} for k in keys: - result = re.search(k, str(line)) + result = re.search(k, line) if result is not None: - dlsch_ulsch_stats[k]=str(line) - + #remove all char before u(lsch) or d(lsch) + dlsch_ulsch_stats[k]=re.sub(r'^.*([du])', r'\g<1>' , line.rstrip()) enb_log_file.close() logging.debug(' File analysis completed') - #RH debug - print(self.air_interface[self.eNB_instance]+'\n') - # if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): nodeB_prefix = 'e' else: @@ -902,19 +895,21 @@ class RANManagement(): logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') htmleNBFailureMsg += statMsg + '\n' #FR1 NSA test : add new markers to make sure gNB is used - if NSA_RAPROC_PUSCH_check: - statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS ' - else: - statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL ' - logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') - htmleNBFailureMsg += statMsg + '\n' - #ulsch and dlsch statistics - if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty - statMsg='' - for key in dlsch_ulsch_stats: #for each dictionary key - statMsg += dlsch_ulsch_stats[key] + '\n' - logging.debug('\u001B[1;30;43m ' + dlsch_ulsch_stats[key] + ' \u001B[0m') - htmleNBFailureMsg += statMsg + '\n' + if NSA_RAPROC_PUSCH_check: + statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS ' + htmlMsg = statMsg+'\n' + else: + statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL ' + htmlMsg = statMsg+'\n' + logging.debug(statMsg) + htmleNBFailureMsg += htmlMsg + #ulsch and dlsch statistics + if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty + statMsg='' + for key in dlsch_ulsch_stats: #for each dictionary key + statMsg += dlsch_ulsch_stats[key] + logging.debug(dlsch_ulsch_stats[key]) + htmleNBFailureMsg += statMsg if uciStatMsgCount > 0: statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' diff --git a/ci-scripts/xml_files/fr1_ran_ue_proc.xml b/ci-scripts/xml_files/fr1_ran_ue_proc.xml index e86a36d2db..330fb27f21 100644 --- a/ci-scripts/xml_files/fr1_ran_ue_proc.xml +++ b/ci-scripts/xml_files/fr1_ran_ue_proc.xml @@ -89,14 +89,14 @@ Ping Ping: 20pings in 20sec -c 20 - 0 + 50 Ping Ping: 5pings in 1sec -c 5 -i 0.2 - 0 + 50 @@ -104,6 +104,7 @@ Terminate eNB 0 0 + lte @@ -111,6 +112,7 @@ Terminate gNB 1 1 + nr From a452f74f0d7306a2288cdf18c82601e444124186 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Tue, 10 Nov 2020 17:14:57 +0100 Subject: [PATCH 7/8] bug fix --- ci-scripts/ran.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 32b2d7e919..8e55b732f8 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -872,8 +872,9 @@ class RANManagement(): for k in keys: result = re.search(k, line) if result is not None: - #remove all char before u(lsch) or d(lsch) - dlsch_ulsch_stats[k]=re.sub(r'^.*([du])', r'\g<1>' , line.rstrip()) + #remove all char before u(lsch) or d(lsch) -> not working for the moment + #dlsch_ulsch_stats[k]=re.sub(r'^.*([du])', r'\g<1>' , line.rstrip()) + dlsch_ulsch_stats[k]=line.rstrip() enb_log_file.close() logging.debug(' File analysis completed') if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): @@ -907,7 +908,7 @@ class RANManagement(): if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty statMsg='' for key in dlsch_ulsch_stats: #for each dictionary key - statMsg += dlsch_ulsch_stats[key] + statMsg += dlsch_ulsch_stats[key] + '\n' logging.debug(dlsch_ulsch_stats[key]) htmleNBFailureMsg += statMsg From 0ea4378bd8ba1e3f780da6598e80f1cd63e4135c Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Thu, 12 Nov 2020 10:40:16 +0100 Subject: [PATCH 8/8] fixing reporting appearance --- ci-scripts/ran.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 8e55b732f8..6425d55c8f 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -867,14 +867,13 @@ class RANManagement(): #dlsch and ulsch statistics #keys below are the markers we are loooking for, loop over this keys list #everytime these markers are found in the log file, the previous ones are overwritten in the dict - #eventually we record only the last occurence + #eventually we record and print only the last occurence keys = {'dlsch_rounds','dlsch_total_bytes','ulsch_rounds','ulsch_total_bytes_scheduled'} for k in keys: result = re.search(k, line) if result is not None: - #remove all char before u(lsch) or d(lsch) -> not working for the moment - #dlsch_ulsch_stats[k]=re.sub(r'^.*([du])', r'\g<1>' , line.rstrip()) - dlsch_ulsch_stats[k]=line.rstrip() + #remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char + dlsch_ulsch_stats[k]=re.sub(r'^.*\]\s+', r'' , line.rstrip()) enb_log_file.close() logging.debug(' File analysis completed') if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'):