From 3d270cf627bf305544e864c313d3b4ab32b28c88 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Tue, 1 Jul 2025 16:47:24 +0200 Subject: [PATCH] CI: replace nc by ncat When migrating from RHEL (on cacofonix) to Ubuntu 22.04 (on acamas), the `nc` command needs to be replaced by `ncat`. The version of `nc` available on Ubuntu is the OpenBSD variant, which lacks support for some options used in our scripts. `ncat` from the Nmap is used instead. --- .../xml_files/container_5g_f1_rfsim.xml | 20 +++++++++---------- .../xml_files/container_5g_rfsim_24prb.xml | 4 ++-- .../xml_files/container_5g_rfsim_ntn_geo.xml | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index 9909e84876..bc8cf586ed 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -133,7 +133,7 @@ Custom_Command Simulate a DL radio channel with noise (3 dB) acamas - echo channelmod modify 0 noise_power_dB 3 | nc --send-only 192.168.71.181 8091 + echo channelmod modify 0 noise_power_dB 3 | ncat --send-only 192.168.71.181 8091 @@ -164,7 +164,7 @@ Custom_Command Trigger Reestablishment acamas - echo ci force_reestab | nc 192.168.71.171 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' + echo ci force_reestab | ncat 192.168.71.171 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' @@ -182,56 +182,56 @@ Custom_Command Verify Reestablishment acamas - echo ci get_reestab_count | nc 192.168.71.150 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' + echo ci get_reestab_count | ncat 192.168.71.150 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' Custom_Command Simulate a disruption of DL radio channel (ploss 55) acamas - echo channelmod modify 0 ploss 55 | nc 192.168.71.181 8091 + echo channelmod modify 0 ploss 55 | ncat 192.168.71.181 8091 Custom_Command Get UE sync state (UE ID 0) acamas - echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_NOT_SYNC + echo ciUE sync_state 0 | ncat 192.168.71.181 8091 | grep -E UE_NOT_SYNC Custom_Command Restoration of the original DL channel conditions (ploss 20) acamas - echo channelmod modify 0 ploss 20 | nc 192.168.71.181 8091 + echo channelmod modify 0 ploss 20 | ncat 192.168.71.181 8091 Custom_Command Get UE sync state (UE ID 0) acamas - echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_CONNECTED + echo ciUE sync_state 0 | ncat 192.168.71.181 8091 | grep -E UE_CONNECTED Custom_Command Trigger Handover acamas - echo ci trigger_f1_ho | nc 192.168.71.150 9090 + echo ci trigger_f1_ho | ncat 192.168.71.150 9090 Custom_Command UE (1) connected to DU-PCI 0? acamas - echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3584" + echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3584" Custom_Command UE (1) connected to DU-PCI 1? acamas - echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3585" + echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3585" diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml index 752252fc11..60bb0011fc 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml @@ -150,14 +150,14 @@ Custom_Command Force Msg3 C-RNTI RA acamas - echo ciUE force_crnti_ra | nc 192.168.71.150 8091 + echo ciUE force_crnti_ra | ncat 192.168.71.150 8091 Custom_Command Force RRC_IDLE (UE ID 0) acamas - echo ciUE force_RRC_IDLE | nc 192.168.71.150 8091 + echo ciUE force_RRC_IDLE | ncat 192.168.71.150 8091 diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml index 9893f805eb..2cefc32722 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml @@ -107,7 +107,7 @@ Custom_Command Trigger Reestablishment acamas - echo ci force_reestab | nc 192.168.71.140 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' + echo ci force_reestab | ncat 192.168.71.140 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' yes @@ -126,7 +126,7 @@ Custom_Command Verify Reestablishment acamas - echo ci get_reestab_count | nc 192.168.71.140 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' + echo ci get_reestab_count | ncat 192.168.71.140 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' yes