From 6a89d4568e52e00f6609b30116bb9da0f4d9bd39 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 9 Mar 2023 15:24:19 +0100 Subject: [PATCH 01/13] fix 20MHz SA tab name --- ci-scripts/xml_files/container_sa_b200_quectel.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index ed0b27080b..203b825f00 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -22,7 +22,7 @@ --> TEST-SA-FR1-B200 - 40 MHz TDD SA + 20 MHz TDD SA tasks 1 From e76e6f126670713c0d5035d7e1bcbca931ca80fa Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 9 Mar 2023 15:24:41 +0100 Subject: [PATCH 02/13] 20MHz MCS9: max UL throughput is 3.5Mpbs --- ci-scripts/xml_files/container_sa_b200_quectel.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index 203b825f00..383b9cabb2 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -136,8 +136,8 @@ Iperf - iperf (UL/8Mbps/UDP)(30 sec)(single-ue profile) - -u -b 8M -t 30 -i 1 -fm + iperf (UL/3.5Mbps/UDP)(30 sec)(single-ue profile) + -u -b 3.5M -t 30 -i 1 -fm UL idefix 1 From 6c6ce912b1005ee3e638937df5889720096e6584 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Thu, 9 Mar 2023 15:27:46 +0100 Subject: [PATCH 03/13] Introduce counters for reestablishment --- openair2/RRC/NR/nr_rrc_defs.h | 3 ++- openair2/RRC/NR/rrc_gNB.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h index bbc0ad07c7..c50bbbbe05 100644 --- a/openair2/RRC/NR/nr_rrc_defs.h +++ b/openair2/RRC/NR/nr_rrc_defs.h @@ -384,7 +384,8 @@ typedef struct gNB_RRC_UE_s { uint8_t established_pdu_sessions_flag; uint32_t ue_rrc_inactivity_timer; int8_t reestablishment_xid; - //------------------------------------------------------------------------------// + uint32_t ue_reestablishment_counter; + uint32_t ue_reconfiguration_after_reestablishment_counter; NR_CellGroupId_t cellGroupId; struct NR_SpCellConfig *spCellConfig; struct NR_CellGroupConfig__sCellToAddModList *sCellconfig; diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index c686bdb81b..ebf6c36bb8 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1246,6 +1246,7 @@ rrc_gNB_process_RRCReconfigurationComplete( for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { nr_reestablish_rnti_map_t *nr_reestablish_rnti_map = &(RC.nrrrc[ctxt_pP->module_id])->nr_reestablish_rnti_map[i]; if (nr_reestablish_rnti_map->ue_id == ctxt_pP->rntiMaybeUEid) { + ue_context_pP->ue_context.ue_reconfiguration_after_reestablishment_counter++; reestablish_ue_id = nr_reestablish_rnti_map[i].c_rnti; LOG_D(NR_RRC, "Removing reestablish_rnti_map[%d] UEid %lx, RNTI %04x\n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti); // clear current C-RNTI from map @@ -2682,6 +2683,8 @@ rrc_gNB_decode_dcch( gNB_MAC_INST *nrmac = RC.nrmac[ctxt_pP->module_id]; // WHAT A BEAUTIFULL RACE CONDITION !!! mac_remove_nr_ue(nrmac, reestablish_rnti); + + ue_context_p->ue_context.ue_reestablishment_counter++; } // ue_context_p->ue_context.ue_release_timer = 0; From e1dc1d9d037911d5f15f1c9edd67ab1d362e3968 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 8 Mar 2023 18:26:55 +0100 Subject: [PATCH 04/13] Correctly implement option to load additional SOs for telnet --- common/utils/telnetsrv/telnetsrv.c | 31 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/common/utils/telnetsrv/telnetsrv.c b/common/utils/telnetsrv/telnetsrv.c index 89e0003bef..a91e7b2398 100644 --- a/common/utils/telnetsrv/telnetsrv.c +++ b/common/utils/telnetsrv/telnetsrv.c @@ -821,14 +821,14 @@ void poll_telnetcmdq(void *qid, void *arg) { * * */ -void exec_moduleinit(char *modname) { +static bool exec_moduleinit(char *modname) { void (*fptr)(void); char initfunc[TELNET_CMD_MAXSIZE+10]; if (strlen(modname) > TELNET_CMD_MAXSIZE) { fprintf(stderr,"[TELNETSRV] module %s not loaded, name exceeds the %i size limit\n", modname, TELNET_CMD_MAXSIZE); - return; + return false; } sprintf(initfunc,"add_%s_cmds",modname); @@ -836,37 +836,35 @@ void exec_moduleinit(char *modname) { if ( fptr != NULL) { fptr(); - } else { - fprintf(stderr,"[TELNETSRV] couldn't find %s for module %s \n",initfunc,modname); + return true; } + fprintf(stderr, "[TELNETSRV] couldn't find %s for module %s \n", initfunc, modname); + return false; } int add_embeddedmodules(void) { int ret=0; int pindex = config_paramidx_fromname(telnetoptions,sizeof(telnetoptions)/sizeof(paramdef_t), TELNETSRV_OPTNAME_STATICMOD); for(int i=0; i Date: Tue, 7 Mar 2023 16:46:58 +0100 Subject: [PATCH 05/13] Add telnet module with CI-specific functions - adds function to retrieve the only UE's RNTI - adds function to trigger reestablishment for the only UE present, or a specific via its RNTI - adds function to verify the reestablishment counters --- common/utils/telnetsrv/CMakeLists.txt | 7 +- common/utils/telnetsrv/DOC/telnetusage.md | 2 +- common/utils/telnetsrv/telnetsrv_ci.c | 133 ++++++++++++++++++++++ 3 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 common/utils/telnetsrv/telnetsrv_ci.c diff --git a/common/utils/telnetsrv/CMakeLists.txt b/common/utils/telnetsrv/CMakeLists.txt index 7994a1d151..d310e1162c 100644 --- a/common/utils/telnetsrv/CMakeLists.txt +++ b/common/utils/telnetsrv/CMakeLists.txt @@ -54,8 +54,13 @@ add_library(telnetsrv_5Gue MODULE telnetsrv_5Gue_measurements.c) add_dependencies(telnetsrv telnetsrv_5Gue) target_link_libraries(telnetsrv_5Gue PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) +message(STATUS "Add CI specific telnet functions in libtelnetsrv_ci.so") +add_library(telnetsrv_ci MODULE telnetsrv_ci.c) +target_link_libraries(telnetsrv_ci PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) +add_dependencies(telnetsrv telnetsrv_ci) + # all libraries should be written to root build dir -set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue +set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue telnetsrv_ci PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../../.. ) diff --git a/common/utils/telnetsrv/DOC/telnetusage.md b/common/utils/telnetsrv/DOC/telnetusage.md index 8b8179fa2b..af509f8648 100644 --- a/common/utils/telnetsrv/DOC/telnetusage.md +++ b/common/utils/telnetsrv/DOC/telnetusage.md @@ -8,7 +8,7 @@ By default the embedded telnet server, which is implemented in a shared library, ./build_oai --build-lib telnetsrv ``` -This will create the `libtelnetsrv.so` and `libtelnetsrv_ file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. can be "enb", "gnb", "4GUE" or "5GUE", each library containing functions specific to a given executable. +This will create the `libtelnetsrv.so` and `libtelnetsrv_ file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. can be "enb", "gnb", "4GUE", "5GUE", or "ci", each library containing functions specific to a given executable. When starting the softmodem, you must specify the **_\-\-telnetsrv_** option to load and start the telnet server. The telnet server is loaded via the [oai shared library loader](loader). diff --git a/common/utils/telnetsrv/telnetsrv_ci.c b/common/utils/telnetsrv/telnetsrv_ci.c new file mode 100644 index 0000000000..b7c19f6c8e --- /dev/null +++ b/common/utils/telnetsrv/telnetsrv_ci.c @@ -0,0 +1,133 @@ +/* + * 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 + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "openair2/RRC/NR/rrc_gNB_UE_context.h" +#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" +#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h" + +#define TELNETSERVERCODE +#include "telnetsrv.h" + +#define ERROR_MSG_RET(mSG, aRGS...) do { prnt(mSG, ##aRGS); return 1; } while (0) + +static int get_single_ue_rnti(void) +{ + NR_UE_info_t *ue = NULL; + UE_iterator(RC.nrmac[0]->UE_info.list, it) { + if (it && ue) + return -1; + if (it) + ue = it; + } + if (!ue) + return -1; + + // verify it exists in RRC as well + rrc_gNB_ue_context_t *rrcue = rrc_gNB_get_ue_context(RC.nrrrc[0], ue->rnti); + if (!rrcue) + return -1; + + return ue->rnti; +} + +int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt) +{ + if (buf) + ERROR_MSG_RET("no parameter allowed\n"); + + int rnti = get_single_ue_rnti(); + if (rnti < 1) + ERROR_MSG_RET("different number of UEs\n"); + + prnt("single UE RNTI %04x\n", rnti); + return 0; +} + +int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt) +{ + int rnti = -1; + if (!buf) { + rnti = get_single_ue_rnti(); + if (rnti < 1) + ERROR_MSG_RET("no UE found\n"); + } else { + rnti = strtol(buf, NULL, 16); + if (rnti < 1 || rnti >= 0xfffe) + ERROR_MSG_RET("RNTI needs to be [1,0xfffe]\n"); + } + + rrc_gNB_ue_context_t *ue = rrc_gNB_get_ue_context(RC.nrrrc[0], rnti); + if (!ue) + ERROR_MSG_RET("could not find UE with RNTI %04x\n", rnti); + + prnt("UE RNTI %04x reestab %d reconf_after_reestab %d\n", + rnti, + ue->ue_context.ue_reestablishment_counter, + ue->ue_context.ue_reconfiguration_after_reestablishment_counter); + return 0; +} + +int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt) +{ + int rnti = -1; + if (!buf) { + rnti = get_single_ue_rnti(); + if (rnti < 1) + ERROR_MSG_RET("no UE found\n"); + } else { + rnti = strtol(buf, NULL, 16); + if (rnti < 1 || rnti >= 0xfffe) + ERROR_MSG_RET("RNTI needs to be [1,0xfffe]\n"); + } + + // verify it exists in RRC as well + rrc_gNB_ue_context_t *rrcue = rrc_gNB_get_ue_context(RC.nrrrc[0], rnti); + if (!rrcue) + ERROR_MSG_RET("could not find UE with RNTI %04x\n", rnti); + + nr_rlc_remove_ue(rnti); + prnt("force-remove UE RNTI %04x from RLC to trigger reestablishment\n", rnti); + return 0; +} + +static telnetshell_cmddef_t cicmds[] = { + {"get_single_rnti", "", get_single_rnti}, + {"force_reestab", "[rnti(hex,opt)]", trigger_reestab}, + {"get_reestab_count", "[rnti(hex,opt)]", get_reestab_count}, + {"", "", NULL}, +}; + +static telnetshell_vardef_t civars[] = { + + {"", 0, 0, NULL} +}; + +void add_ci_cmds(void) { + add_telnetcmd("ci", civars, cicmds); +} From 76caa943b59ef7d95cee9ae1ba2de309da32a390 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 8 Mar 2023 18:33:39 +0100 Subject: [PATCH 06/13] Add telnetsrv_ci to docker images --- docker/Dockerfile.gNB.rhel8.2 | 1 + docker/Dockerfile.gNB.ubuntu20 | 1 + 2 files changed, 2 insertions(+) diff --git a/docker/Dockerfile.gNB.rhel8.2 b/docker/Dockerfile.gNB.rhel8.2 index 9af0812cd6..187de03e37 100644 --- a/docker/Dockerfile.gNB.rhel8.2 +++ b/docker/Dockerfile.gNB.rhel8.2 @@ -73,6 +73,7 @@ COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ /oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \ + /oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \ /usr/local/lib/ COPY --from=gnb-base \ diff --git a/docker/Dockerfile.gNB.ubuntu20 b/docker/Dockerfile.gNB.ubuntu20 index f2d89a406e..07d1413093 100644 --- a/docker/Dockerfile.gNB.ubuntu20 +++ b/docker/Dockerfile.gNB.ubuntu20 @@ -78,6 +78,7 @@ COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ /oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \ + /oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \ /usr/local/lib/ # Now we are copying from builder-image the UHD files. From 7fc9550f7b0b3bb0e6f3e667ef0a5015dac07369 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 9 Mar 2023 15:46:43 +0100 Subject: [PATCH 07/13] Load telnet CI in docker-compose --- ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml index 32655ffe77..6458a39e23 100644 --- a/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml @@ -20,7 +20,7 @@ services: GNB_NGA_IP_ADDRESS: 192.168.68.194 GNB_NGU_IF_NAME: eth0 GNB_NGU_IP_ADDRESS: 192.168.68.194 - USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function + USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function volumes: - /dev:/dev networks: From e3520f952ecc3f7f9893c85863195450454f85ba Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 7 Mar 2023 18:56:28 +0100 Subject: [PATCH 08/13] DOC to finish --- common/utils/telnetsrv/DOC/telnetusage.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/utils/telnetsrv/DOC/telnetusage.md b/common/utils/telnetsrv/DOC/telnetusage.md index af509f8648..2c6d5c1bab 100644 --- a/common/utils/telnetsrv/DOC/telnetusage.md +++ b/common/utils/telnetsrv/DOC/telnetusage.md @@ -8,7 +8,7 @@ By default the embedded telnet server, which is implemented in a shared library, ./build_oai --build-lib telnetsrv ``` -This will create the `libtelnetsrv.so` and `libtelnetsrv_ file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. can be "enb", "gnb", "4GUE", "5GUE", or "ci", each library containing functions specific to a given executable. +This will create the `libtelnetsrv.so` and `libtelnetsrv_` file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. `` can be "enb", "gnb", "4GUE", "5GUE", or "ci", each library containing functions specific to a given executable. When starting the softmodem, you must specify the **_\-\-telnetsrv_** option to load and start the telnet server. The telnet server is loaded via the [oai shared library loader](loader). @@ -36,5 +36,6 @@ The telnet server is using the [oai configuration module](Config/Rtusage). Telne | `loopdelay` | `integer` | 5000 | delay (in ms) between 2 loop command iterations | Y | | `histfile` | `character string` | "oaitelnet.history" | file used for command history persistency | Y | | `histfsize` | `integer` | 50 | maximum number of commands saved in the history | Y | +| complete | [oai telnet server home](telnetsrv.md) From 4ae28aba107f5f857f1bfcb8420f3d3162c62b44 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 10 Mar 2023 12:31:18 +0100 Subject: [PATCH 09/13] Custom_Command: add option to fail if returncode is non-zero --- ci-scripts/main.py | 3 +++ ci-scripts/ran.py | 22 +++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 7be8c594fd..4674be4966 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -429,6 +429,7 @@ def GetParametersFromXML(action): elif action == 'Custom_Command': RAN.node = test.findtext('node') RAN.command = test.findtext('command') + RAN.command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes'] else: logging.warning(f"unknown action {action} from option-parsing point-of-view") @@ -752,6 +753,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'Custom_Command': logging.info(f"Executing custom command") RAN.CustomCommand(HTML) + if RAN.prematureExit: + CiTestObj.AutoTerminateeNB(HTML,RAN,EPC,CONTAINERS) elif action == 'Initialize_eNB': RAN.InitializeeNB(HTML, EPC) if RAN.prematureExit: diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index a8e66989c2..dc3a7d8d35 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -99,6 +99,7 @@ class RANManagement(): self.cmd_prefix = '' # prefix before {lte,nr}-softmodem self.node = '' self.command = '' + self.command_fail = False #----------------------------------------------------------- @@ -259,19 +260,22 @@ class RANManagement(): self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.backgroundBuildTestId[int(self.eNB_instance)], HTML) def CustomCommand(self, HTML): - if self.node == '' or self.node == "localhost": - cmd = cls_cmd.LocalCmd() - else: - cmd = cls_cmd.RemoteCmd(self.node) + cmd = cls_cmd.getConnection(self.node) ret = cmd.run(self.command) cmd.close() - logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode} output: {ret.stdout}') - html_queue = SimpleQueue() + logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode}') status = 'OK' - if ret.returncode != 0: - html_queue.put(ret.stdout) + message = '' + if ret.returncode != 0 and not self.command_fail: + message = ret.stdout + logging.warning(f'CustomCommand output: {message}') status = 'Warning' - HTML.CreateHtmlTestRow(self.command, status, 1, html_queue) + if ret.returncode != 0 and self.command_fail: + message = ret.stdout + logging.error(f'CustomCommand failed: output: {message}') + status = 'KO' + self.prematureExit = True + HTML.CreateHtmlTestRowQueue(self.command, status, [message]) def checkBuildeNB(self, lIpAddr, lUserName, lPassWord, lSourcePath, testcaseId, HTML): HTML.testCase_id=testcaseId From 59feb72fca7748aa7ae2b1ba3af246eae9da8c8d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 10 Mar 2023 12:32:26 +0100 Subject: [PATCH 10/13] SA Quectel test: add reestablishment test --- .../xml_files/container_sa_b200_quectel.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index 383b9cabb2..550e47caf1 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -36,6 +36,9 @@ 070000 070001 070002 + 060001 + 000002 + 060002 010010 010002 030201 @@ -154,6 +157,21 @@ single-ue + + Custom_Command + Trigger Reestablishment + nepes + echo ci force_reestab | nc -N 192.168.71.140 9090 | grep -E 'force-remove UE RNTI [0-9a-f]{4} from RLC to trigger reestablishment' + yes + + + Custom_Command + Verify Reestablishment + nepes + echo ci get_reestab_count | nc -N 192.168.71.140 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1 reconf_after_reestab 1' + yes + + Undeploy_Object Undeploy gNB From 31e6b5814f6ea058eaf916d50a4f7263ac319808 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 10 Mar 2023 14:29:54 +0100 Subject: [PATCH 11/13] fixup --- ci-scripts/xml_files/container_sa_b200_quectel.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index 550e47caf1..ae22723494 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -39,6 +39,7 @@ 060001 000002 060002 + 050000 010010 010002 030201 @@ -161,14 +162,14 @@ Custom_Command Trigger Reestablishment nepes - echo ci force_reestab | nc -N 192.168.71.140 9090 | grep -E 'force-remove UE RNTI [0-9a-f]{4} from RLC to trigger reestablishment' + echo ci force_reestab | nc -N 192.168.68.194 9090 | grep -E 'force-remove UE RNTI [0-9a-f]{4} from RLC to trigger reestablishment' yes Custom_Command Verify Reestablishment nepes - echo ci get_reestab_count | nc -N 192.168.71.140 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1 reconf_after_reestab 1' + echo ci get_reestab_count | nc -N 192.168.68.194 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1 reconf_after_reestab 1' yes From 8352f71a71b64d18042507f48d4b91e3a6234b73 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 13 Mar 2023 19:31:41 +0100 Subject: [PATCH 12/13] Show output of CustomCommand if it would make the pipeline fail --- ci-scripts/ran.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index dc3a7d8d35..c2ee7af1e3 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -265,17 +265,19 @@ class RANManagement(): cmd.close() logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode}') status = 'OK' - message = '' + message = [] if ret.returncode != 0 and not self.command_fail: - message = ret.stdout + message = [ret.stdout] logging.warning(f'CustomCommand output: {message}') status = 'Warning' + if self.command_fail: # important command since it would make the pipeline fail, so show output in HTML + message = [ret.stdout] if ret.returncode != 0 and self.command_fail: - message = ret.stdout + message = [ret.stdout] logging.error(f'CustomCommand failed: output: {message}') status = 'KO' self.prematureExit = True - HTML.CreateHtmlTestRowQueue(self.command, status, [message]) + HTML.CreateHtmlTestRowQueue(self.command, status, message) def checkBuildeNB(self, lIpAddr, lUserName, lPassWord, lSourcePath, testcaseId, HTML): HTML.testCase_id=testcaseId From 2560ba84e8ec82ce0ff6cd415650e0168c8ba583 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 13 Mar 2023 19:45:55 +0100 Subject: [PATCH 13/13] telnet documentation --- common/utils/telnetsrv/DOC/telnetusage.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/common/utils/telnetsrv/DOC/telnetusage.md b/common/utils/telnetsrv/DOC/telnetusage.md index 2c6d5c1bab..8b8b72a698 100644 --- a/common/utils/telnetsrv/DOC/telnetusage.md +++ b/common/utils/telnetsrv/DOC/telnetusage.md @@ -32,10 +32,15 @@ The telnet server is using the [oai configuration module](Config/Rtusage). Telne |:---:|:---:|:---:|:----|:----:| | `listenaddr` | `ipV4 address, ascii format` | "0.0.0.0" | local address the server is listening on| N | | `listenport` | `integer` | 9090 | port number the server is listening on | N | +| `listenstdin` | `integer` (bool) | 0 | enable input from stdin via additional thread | N | +| `policy` | `integer` | 0 | scheduling priority for telnet (0-99) | N | | `loopcount` | `integer` | 10 | number of iterations for the loop command | Y | | `loopdelay` | `integer` | 5000 | delay (in ms) between 2 loop command iterations | Y | -| `histfile` | `character string` | "oaitelnet.history" | file used for command history persistency | Y | -| `histfsize` | `integer` | 50 | maximum number of commands saved in the history | Y | -| complete | +| `histfile` | `string` | "oaitelnet.history" | file used for command history persistency | Y | +| `histsize` | `integer` | 50 | maximum number of commands saved in the history | Y | +| `logfile` | `string` | `oaisoftmodem.log` | output file to which to redirect +| `phypbsize` | `integer` | 65000 | string buffer size to dump phy stats | Y | +| `staticmod` | `string` | (empty) | additional internally defined telnet modules (`--telnetsrv.staticmod X`, comma-separated) to load on startup. The modules should define a function `add_X_cmds()` in which the module can register telnet commands | N | +| `shrmod` | `string` | (empty) | additional shared object files `telnetsrv_X.so` (`--telnetsrv.shrmod X`, comma-separated) to load on startup. The shared object(s) should define a function `add_X_cmds()` in which the shared object can register telnet commands | N | [oai telnet server home](telnetsrv.md)