diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 2b31f41064..144bc24da6 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -503,6 +503,11 @@ class OaiCiTest(): t = iperf_time * 2.5 cmd_ue.run(f'rm {client_filename}', reportNonZero=False, silent=True) if cn.runIperf3Server(): + # Clean up any existing iperf3 server processes on this port. + ret = cmd_svr.run(f"{cn.getCmdPrefix()} pkill -f '.*iperf3.*{port}'", reportNonZero=False) + # If pkill succeeds, it means there was a leftover iperf3 server. + if ret.returncode == 0: + logging.warning(f'Iperf3 server on port {port} detected and terminated') cmd_svr.run(f'{cn.getCmdPrefix()} timeout -vk3 {t} iperf3 -s -B {svrIP} -p {port} -1 {jsonReport} >> /dev/null &', timeout=t) cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} {iperf_ue} -B {ueIP} -c {svrIP} -p {port} {iperf_opt} {jsonReport} {serverReport} -O 5 >> {client_filename}', timeout=t) dest_filename = archiveArtifact(cmd_ue, ctx, client_filename) diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index d8dc580a04..49a28e4a9f 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -138,7 +138,7 @@ Iperf - Iperf (DL/3Mbps/UDP)(30 sec) + Iperf (DL/3Mbps/UDP)(20 sec) -u -b 3M -t 20 -R rfsim5g_ue localhost @@ -150,7 +150,7 @@ Iperf - Iperf (UL/3Mbps/UDP)(30 sec) + Iperf (UL/3Mbps/UDP)(20 sec) -u -b 3M -t 20 rfsim5g_ue localhost diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml index e2566bfd25..89cbe35dfa 100644 --- a/ci-scripts/xml_files/container_5g_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_rfsim.xml @@ -196,7 +196,7 @@ Iperf - Iperf (DL/3Mbps/UDP)(30 sec) + Iperf (DL/3Mbps/UDP)(20 sec) -u -b 3M -t 20 -R rfsim5g_ue localhost @@ -208,7 +208,7 @@ Iperf - Iperf (UL/1Mbps/UDP)(30 sec) + Iperf (UL/1Mbps/UDP)(20 sec) -u -b 1M -t 20 rfsim5g_ue localhost diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml index 849c91a7b0..470c5e9539 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml @@ -121,7 +121,7 @@ Iperf - Iperf (DL/3Mbps/UDP)(30 sec) + Iperf (DL/3Mbps/UDP)(20 sec) -u -b 3M -t 20 -R rfsim5g_ue localhost @@ -133,7 +133,7 @@ Iperf - Iperf (UL/1Mbps/UDP)(30 sec) + Iperf (UL/1Mbps/UDP)(20 sec) -u -b 1M -t 20 rfsim5g_ue localhost diff --git a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml index ed0e11807c..636df9e729 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml @@ -97,7 +97,7 @@ Iperf - Iperf (DL/10Mbps/UDP)(30 sec) + Iperf (DL/10Mbps/UDP)(20 sec) -u -b 10M -t 20 -R rfsim5g_ue localhost @@ -109,7 +109,7 @@ Iperf - Iperf (UL/3Mbps/UDP)(30 sec) + Iperf (UL/3Mbps/UDP)(20 sec) -u -b 3M -t 20 rfsim5g_ue localhost diff --git a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml index 4ff5dbedc8..2a180440d0 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml @@ -97,7 +97,7 @@ Iperf - Iperf (DL/30kbps/UDP)(30 sec) + Iperf (DL/30kbps/UDP)(20 sec) -u -b 0.03M -t 20 -R -c 10.0.1.1 rfsim5g_ue localhost @@ -109,7 +109,7 @@ Iperf - Iperf (UL/30kbps/UDP)(30 sec) + Iperf (UL/30kbps/UDP)(20 sec) -u -b 0.03M -t 20 -c 10.0.1.1 rfsim5g_ue localhost diff --git a/ci-scripts/xml_files/container_5g_rfsim_multiue.xml b/ci-scripts/xml_files/container_5g_rfsim_multiue.xml index 215f58c2a7..4296fdf970 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_multiue.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_multiue.xml @@ -155,7 +155,7 @@ Iperf - Iperf (DL/3Mbps/UDP)(30 sec) + Iperf (DL/3Mbps/UDP)(20 sec) -u -b 3M -t 20 -R rfsim5g_multiue1 localhost @@ -167,7 +167,7 @@ Iperf - Iperf (UL/1Mbps/UDP)(30 sec) + Iperf (UL/1Mbps/UDP)(20 sec) -u -b 1M -t 20 rfsim5g_multiue1 localhost diff --git a/ci-scripts/xml_files/container_5g_rfsim_n2_ho.xml b/ci-scripts/xml_files/container_5g_rfsim_n2_ho.xml index 5da417c284..814f258e0a 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_n2_ho.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_n2_ho.xml @@ -120,7 +120,7 @@ Iperf - Iperf (DL/10Mbps/UDP)(30 sec) + Iperf (DL/10Mbps/UDP)(20 sec) -u -b 3M -t 20 -R rfsim5g_ue localhost @@ -132,7 +132,7 @@ Iperf - Iperf (UL/4Mbps/UDP)(30 sec) + Iperf (UL/4Mbps/UDP)(20 sec) -u -b 1M -t 20 rfsim5g_ue localhost diff --git a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml index f70c81732e..c7668c5022 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml @@ -117,7 +117,7 @@ Iperf - Iperf (DL/3Mbps/UDP)(30 sec) + Iperf (DL/3Mbps/UDP)(20 sec) -u -b 3M -t 20 -R rfsim5g_ue localhost @@ -129,7 +129,7 @@ Iperf - Iperf (UL/1Mbps/UDP)(30 sec) + Iperf (UL/1Mbps/UDP)(20 sec) -u -b 1M -t 20 rfsim5g_ue localhost