Telnet: improve fetch_du_by_ue_id to auto-detect connected UE
Issue: sometimes it happens that an ul failure occurs in the handover pipeline, UE reconnects with different UE ID and fetch_du_by_ue_id fails. - Modified fetch_du_by_ue_id in telnetsrv_ci.c to automatically find the connected UE when no UE ID is provided, similar to other telnet commands like rrc_gNB_trigger_f1_ho - Updated test cases in container_sa_f1_ho_b210_quectel.xml to use the improved command without hardcoded UE ID parameter - This makes the command more robust and easier to use in CI tests
This commit is contained in:
@@ -240,7 +240,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE (1) connected to DU-PCI 1?</desc>
|
||||
<node>localhost</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3585"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 192.168.71.150 9090 | grep "3585"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
@@ -271,7 +271,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE (1) connected to DU-PCI 0?</desc>
|
||||
<node>localhost</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3584"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 192.168.71.150 9090 | grep "3584"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
@@ -302,7 +302,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE (1) connected to DU-PCI 1?</desc>
|
||||
<node>localhost</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3585"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 192.168.71.150 9090 | grep "3585"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE (1) connected to DU-PCI 1?</desc>
|
||||
<node>localhost</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.180 9090 | grep "1234"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 192.168.71.180 9090 | grep "1234"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
@@ -181,7 +181,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE (1) connected to DU-PCI 0?</desc>
|
||||
<node>localhost</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3584"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 192.168.71.150 9090 | grep "3584"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
@@ -218,7 +218,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE (1) connected to DU-PCI 1?</desc>
|
||||
<node>localhost</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.180 9090 | grep "1234"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 192.168.71.180 9090 | grep "1234"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE connected to DU1?</desc>
|
||||
<node>groot</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 127.0.0.1 9090 | grep "3585"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 127.0.0.1 9090 | grep "3585"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
@@ -152,7 +152,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE connected to DU0?</desc>
|
||||
<node>groot</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 127.0.0.1 9090 | grep "3584"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 127.0.0.1 9090 | grep "3584"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
@@ -175,7 +175,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE connected to DU1?</desc>
|
||||
<node>groot</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 127.0.0.1 9090 | grep "3585"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 127.0.0.1 9090 | grep "3585"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE connected to gNB-PCI1?</desc>
|
||||
<node>rocket</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 127.0.0.1 9090 | grep "3585"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 127.0.0.1 9090 | grep "3585"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
@@ -144,7 +144,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE connected to gNB-PCI0?</desc>
|
||||
<node>groot</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 127.0.0.1 9090 | grep "3584"</command>
|
||||
<command>echo ci fetch_du_by_ue_id | ncat 127.0.0.1 9090 | grep "3584"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
|
||||
@@ -154,10 +154,17 @@ int fetch_du_by_ue_id(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
if (!RC.nrrrc)
|
||||
ERROR_MSG_RET("no RRC present, cannot list counts\n");
|
||||
|
||||
ue_id_t ue_id = 1;
|
||||
ue_id_t ue_id;
|
||||
if (buf) {
|
||||
ue_id = strtol(buf, NULL, 10);
|
||||
} else {
|
||||
// No UE ID provided: find the connected UE first
|
||||
rrc_gNB_ue_context_t *ue = get_single_rrc_ue();
|
||||
if (!ue)
|
||||
ERROR_MSG_RET("no single UE in RRC present\n");
|
||||
ue_id = ue->ue_context.rrc_ue_id;
|
||||
}
|
||||
|
||||
nr_rrc_du_container_t *du = get_du_for_ue(RC.nrrrc[0], ue_id);
|
||||
|
||||
if (du) {
|
||||
|
||||
Reference in New Issue
Block a user