Commit 5d58645a authored by Robert Schmidt's avatar Robert Schmidt

Merge branch 'integration_2023_w03' into 'develop'

integration_2023_w03

See merge request oai/openairinterface5g!1919

!1880 Fix to schedule NR SRS K2 slots in advance
!1885 cleaning only
!1912 Correctly encode DNN length/APN name
!1913 bugfix: initialize all variables of the 'context' thing
!1914 bugfix: avoid a crash when oai_exit is set
!1915 remove patch in install_simde_from_source()
!1882 CI: Add more RFsim tests, cleanup
parents 214aa505 d5010250
This diff is collapsed.
#!/bin/bash
while true
do
echo "gNB will be started automatically..."
sleep 1
sudo .././cmake_targets/ran_build/build/nr-softmodem -E -O ../targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
done
This diff is collapsed.
......@@ -1001,7 +1001,7 @@ class Containerize():
services.append(s)
logging.info(f'stopping services {services}')
mySSH.command(f'docker-compose -f ci-docker-compose.yml stop', '\$', 30)
mySSH.command(f'docker-compose -f ci-docker-compose.yml stop -t3', '\$', 30)
time.sleep(5) # give some time to running containers to stop
for svcName in services:
# head -n -1 suppresses the final "X exited with status code Y"
......@@ -1203,7 +1203,7 @@ class Containerize():
# Stop the containers to shut down objects
logging.debug('\u001B[1m Stopping containers \u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop'
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop -t3'
logging.info(cmd)
try:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
......
......@@ -193,6 +193,7 @@ class OaiCiTest():
self.expectedNbOfConnectedUEs = 0
self.ue_id = '' #used for module identification
self.ue_trace ='' #used to enable QLog trace for Module UE, passed to Module UE object at InitializeUE()
self.cmd_prefix = '' # prefix before {lte,nr}-uesoftmodem
def BuildOAIUE(self,HTML):
......@@ -489,7 +490,7 @@ class OaiCiTest():
copyin_res = SSH.copyin(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, RAN.eNBSourceCodePath + '/cmake_targets/reconfig.raw', '.')
if (copyin_res == 0):
SSH.copyout(self.UEIPAddress, self.UEUserName, self.UEPassword, './reconfig.raw', self.UESourceCodePath + '/cmake_targets/ran_build/build')
SSH.command('echo "ulimit -c unlimited && ./'+ self.air_interface +' ' + self.Initialize_OAI_UE_args + '" > ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
SSH.command(f'echo "ulimit -c unlimited && {self.cmd_prefix} ./{self.air_interface} {self.Initialize_OAI_UE_args}" > ./my-lte-uesoftmodem-run{self.UE_instance}.sh', '\$', 5)
SSH.command('chmod 775 ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
SSH.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log', '\$', 5)
self.UELogFile = 'ue_' + self.testCase_id + '.log'
......
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
#/*
# * 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
# */
function create_usage {
echo "OAI CI VM script"
echo " Original Author: Raphael Defosseux"
echo " Requirements:"
echo " -- uvtool uvtool-libvirt apt-cacher"
echo " -- $VM_OSREL image already synced"
echo " Default:"
echo " -- eNB with USRP"
echo ""
echo "Usage:"
echo "------"
echo " oai-ci-vm-tool create [OPTIONS]"
echo ""
echo "Mandatory Options:"
echo "--------"
echo " --job-name #### OR -jn ####"
echo " Specify the name of the Jenkins job."
echo ""
echo " --build-id #### OR -id ####"
echo " Specify the build ID of the Jenkins job."
echo ""
variant_usage
echo " Specify the variant to build."
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
function acquire_vm_create_lock {
local FlockFile="/tmp/vmclone.lck"
local unlocked="0"
touch ${FlockFile} 2>/dev/null
if [[ $? -ne 0 ]]
then
echo "Cannot access lock file ${FlockFile}"
exit 2
fi
while [ $unlocked -eq 0 ]
do
exec 5>${FlockFile}
flock -nx 5
if [[ $? -ne 0 ]]
then
echo "Another instance of VM creation is running"
sleep 10
else
unlocked="1"
fi
done
chmod 666 ${FlockFile} 2>/dev/null
}
function release_vm_create_lock {
local FlockFile="/tmp/vmclone.lck"
rm -Rf ${FlockFile}
}
function create_vm {
echo "############################################################"
echo "OAI CI VM script"
echo "############################################################"
echo "VM_NAME = $VM_NAME"
echo "VM_MEMORY = $VM_MEMORY MBytes"
echo "VM_CPU = $VM_CPU"
echo "VM_DISK = $VM_DISK GBytes"
if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] || [[ "$VM_NAME" == *"rf5g-sim"* ]]
then
echo "This VM type is no longer supported in the pipeline framework"
return
fi
echo "############################################################"
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
echo "############################################################"
acquire_vm_create_lock
uvt-kvm create $VM_NAME release=$VM_OSREL --memory $VM_MEMORY --cpu $VM_CPU --disk $VM_DISK --unsafe-caching --template ci-scripts/template-host.xml
echo "Waiting for VM to be started"
uvt-kvm wait $VM_NAME --insecure
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
release_vm_create_lock
}
#!/bin/bash
#/*
# * 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
# */
function destroy_usage {
echo "OAI CI VM script"
echo " Original Author: Raphael Defosseux"
echo " Requirements:"
echo " -- uvtool uvtool-libvirt apt-cacher"
echo ""
echo "Usage:"
echo "------"
echo " oai-ci-vm-tool destroy [OPTIONS]"
echo ""
command_options_usage
}
function destroy_vm {
echo "############################################################"
echo "OAI CI VM script"
echo "############################################################"
echo "VM_TEMPLATE = $VM_TEMPLATE"
LIST_CI_VM=`uvt-kvm list | grep $VM_TEMPLATE`
for CI_VM in $LIST_CI_VM
do
VM_IP_ADDR=`uvt-kvm ip $CI_VM`
echo "VM to destroy: $CI_VM -- IP $VM_IP_ADDR"
uvt-kvm destroy $CI_VM
ssh-keygen -R $VM_IP_ADDR
done
}
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI CI Dev documentation</font></b>
</td>
</tr>
</table>
VM-based RF-Less Environment:
* [How to setup your test env](./vm_based_simulator_env.md)
* [How to deal with OAI source files](./vm_based_simulator_sources.md)
* [The main script](./vm_based_simulator_main_scripts.md)
* [How to create one or several VM instances](./vm_based_simulator_create.md)
* [How to build an OAI variant](./vm_based_simulator_build.md)
* [How the build is checked](./vm_based_simulator_check_build.md)
* [How to test an OAI variant](./vm_based_simulator_test.md)
* [How to destroy all VM instances](./vm_based_simulator_destroy.md)
Currently missing documentation:
* How to generate a build report
* How to generate a test report
---
This diff is collapsed.
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI CI Virtual-Machine-based Test Environment: checking the build result</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
# 1. Introduction #
Function is called:
- when building in foreground
- when waiting for the background build process is finished
# 2. Detailed Description #
Source file concerned: `ci-scripts/waitBuildOnVM.sh`
## 2.1. check_on_vm_build function ##
* Retrieve the build log files from the VM instance `ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt`
* and copy them locally in the workspace at $ARCHIVES_LOC
* List all log files that match the pattern. Each should have
* the `Built target` pattern (the library/executable SHALL link)
* Evaluate the remaining space on VM disk
* The number of patterned log files SHALL match $NB_PATTERN_FILES defined in `ci-scripts/oai-ci-vm-tool` script for the variant
---
Next step: [how to test a function](./vm_based_simulator_test.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI CI Virtual-Machine-based Test Environment: create a VM instance</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
# 1. Introduction #
```bash
$ cd /tmp/CI-raphael
$ ./ci-scripts/oai-ci-vm-tool create --help
OAI CI VM script
Original Author: Raphael Defosseux
Requirements:
-- uvtool uvtool-libvirt apt-cacher
-- xenial image already synced
Default:
-- eNB with USRP
Usage:
------
oai-ci-vm-tool create [OPTIONS]
Mandatory Options:
--------
--job-name #### OR -jn ####
Specify the name of the Jenkins job.
--build-id #### OR -id ####
Specify the build ID of the Jenkins job.
# OpenAirInterface Build Variants
--variant enb-usrp OR -v1 ( build and test )
--variant phy-sim OR -v3 ( build and test )
--variant cppcheck OR -v4 ( build and test )
--variant gnb-usrp OR -v5 ( build and test )
--variant nr-ue-usrp OR -v6 ( build and test )
--variant enb-ethernet OR -v7 ( build and test )
--variant ue-ethernet OR -v8 ( build and test )
# non-OSA Build Variants
--variant flexran-rtc OR -v10 ( build and test non-OSA )
# OpenAirInterface Test Variants
--variant l1-sim OR -v20 ( test )
--variant rf-sim OR -v21 ( test )
--variant l2-sim OR -v22 ( test )
Specify the variant to build.
--help OR -h
Print this help message.
```
# 2. Detailed Description #
Source file concerned: `ci-scripts/createVM.sh`
## 2.1. create_vm function ##
This is the function that is being called from the main oai-vm-tool script.
The main purpose is to start a VM instance:
```bash
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --disk $VM_DISK --unsafe-caching --template ci-scripts/template-host.xml
```
Variables are set in the main script based on the options.
`--unsafe-caching` option is used because our VM instances are throw-away's.
`--template ci-scripts/template-host.xml` is used to duplicate the CPU properties to the VM instance. **VERY IMPORTANT to build OAI**
## 2.2. Lock / Unlock functions ##
There are `acquire_vm_create_lock` and `release_vm_create_lock` functions.
Creating Virtual Machines instances in parallel **creates a lot of stress** on the host server HW. If you launch creations in parallel (Jenkins pipeline could do it) or you are several people working on the same host server, this mechanism atomizes the creation process and wait until the previous VM creation is finished.
# 3. Typical Usage #
```bash
$ cd /tmp/CI-raphael
$ ./ci-scripts/oai-ci-vm-tool create --job-name raphael --build-id 1 --variant phy-sim
# or a more **unique approach**
$ ./ci-scripts/oai-ci-vm-tool create -jn toto -id 1 -v2
```
The Jenkins pipeline uses the master job name as `job-name` option and the job-build ID.
Try to be unique if you are several developers working on the same host server.
Finally, typically I never use the `create` command. I use directly the build command that checks if VM is created and if not, will create it. See next step.
---
Next step: [how to build an OAI variant](./vm_based_simulator_build.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI CI Virtual-Machine-based Test Environment: Properly Destroy all VM instances</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
# 1. Introduction #
```bash
$ cd /tmp/CI-raphael
$ ./ci-scripts/oai-ci-vm-tool destroy --help
OAI CI VM script
Original Author: Raphael Defosseux
Requirements:
-- uvtool uvtool-libvirt apt-cacher
Usage:
------
oai-ci-vm-tool destroy [OPTIONS]
Mandatory Options:
--------
--job-name #### OR -jn ####
Specify the name of the Jenkins job.
--build-id #### OR -id ####
Specify the build ID of the Jenkins job.
Options:
--------
--help OR -h
Print this help message.
```
# 2. Detailed Description #
Source file concerned: `ci-scripts/destroyAllRunningVM.sh`
## 2.1. destroy_vm function ##
This is the function that is being called from the main oai-vm-tool script.
The main purpose is to destroy all VM instances whose name matches a pattern.
It also cleans up the `.ssh/known_hosts` file.
# 3. Typical Usage #
```bash
$ cd /tmp/CI-raphael
$ ./ci-scripts/oai-ci-vm-tool destroy --job-name raphael --build-id 1
```
---
You can go back to the [CI dev main page](./ci_dev_home.md)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI CI Virtual-Machine-based Simulator Test Environment</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
# 1. Introduction #
This document explains how the master pipeline works and how any developer could contribute to add testing.
It is an extension to the wiki [page](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/ci/enb-master-job).
The purpose of this master pipeline is to:
* Validate that a Merge Request is mergeable
* Validate that a Merge Request is following coding guidelines
* Validate that a Merge Request is not breaking any typical build variant
* Validate that a Merge Request is not breaking any legacy simulator-based test
We will mainly focused on the 2 last items.
Last point, this documentation is valid for all CI-supported branches:
* `master`
* `develop`
But the feature set may not be aligned. **The principles still apply.**
# 2. Prerequisites #
Some details are available on this wiki [section](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/ci/enb-ci-architecture#22-pipeline-executor).
Currently we have a host server (`bellatrix`) with the current parameters:
* 40 x Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz
* 64 Gbytes RAM
* Ubuntu 16.04.3 LTS (xenial)
For you to replicate this environment, you need a strong server:
* At least 16 cores
* Ubuntu 16 (xenial) or higher (such as bionic, not tested)
Also we are using a Virtual Machine (VM for the rest of document) based strategy for the moment.
So you need to install 2 tools:
* uvt-kvm
* apt-cacher
We are planning to also add:
* A Red Hat Linux Entreprise 7.6 host environment
* A Container-based strategy (such as Docket and Kubernetes)
## 2.1. uvtool installation ##
```bash
$ sudo apt-get install uvtool
# if you don't have already, create an ssh key
$ ssh-keygen -b 2048
# retrieve an image
$ sudo uvt-simplestreams-libvirt sync arch=amd64 release=xenial
# we might soon switch to an Ubuntu 18.04 version
$ sudo uvt-simplestreams-libvirt sync arch=amd64 release=bionic
$ uvt-simplestreams-libvirt query
release=bionic arch=amd64 label=release (20190402)
release=xenial arch=amd64 label=release (20190406)
```
On our server, I don't update (sync) that often (every 2-4 months).
For more details:
* uvtool syntax is [here](http://manpages.ubuntu.com/manpages/trusty/man1/uvt-kvm.1.html)
* more readable tutorial is [here](https://help.ubuntu.com/lts/serverguide/cloud-images-and-uvtool.html)
## 2.2. apt-cacher-server installation ##
I recommend to follow to the letter this [tutorial](https://help.ubuntu.com/community/Apt-Cacher-Server).
The reason: we are creating/using/destroying a lot of VM instances and we are always installing the same packages.
This service allows to cache on the host and, doing so, **decreases the pressure on your internet bandwith usage**.
It also optimizes time at build stage.
```bash
$ sudo apt-get install apt-cacher apache2
$ sudo vi /etc/default/apt-cache
$ sudo service apache2 restart
# Server configuration
$ sudo vi /etc/apt-cacher/apt-cacher.conf
--> allowed_hosts = *
--> fix the installer_files_regexp
$ sudo vi /etc/apt/apt.conf.d/01proxy
--> add `Acquire::http::Proxy "http://<IP address or hostname of the apt-cacher server>:3142";`
$ sudo service apt-cacher restart
```
This last file (/etc/apt/apt.conf.d/01proxy) is very important since it is tested in any CI script.
---
We can now switch to the next step: [how to deal with oai sources](./vm_based_simulator_sources.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI CI Virtual-Machine-based Test Environment: the Main Script</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
# 1. Introduction #
The file name is `./ci-scripts/oai-ci-vm-tool` from the workspace root.
```bash
$ cd /tmp/CI-raphael
$ ./ci-scripts/oai-ci-vm-tool --help
OAI CI VM script
Original Author: Raphael Defosseux
Requirements:
-- uvtool uvtool-libvirt apt-cacher
-- xenial image already synced
Usage:
------
oai-ci-vm-tool (-h|--help) {create,destroy,build,wait,test,report-build,report-test} ...
```
This is a **BASH** script.
# 2. Sub BASH scripts #
The main script is including a bunch of sub BASH scripts.
* ci-scripts/createVM.sh
* ci-scripts/buildOnVM.sh
* ci-scripts/waitBuildOnVM.sh
* ci-scripts/destroyAllRunningVM.sh
* ci-scripts/runTestOnVM.sh
* ci-scripts/reportBuildLocally.sh
* ci-scripts/reportTestLocally.sh
**NOTE: ci-scripts/runTestOnVM.sh is getting big and will certainly be split to facilitate maintenance. Start functions will be also factorized.**
# 3. Main script features #
The main purpose of the main script is decipher the options and launch the requested function.
It is also **testing if uvtool and apt-cacher are installed.**
It finally provides parameters to the requested functions. Parameter definition is centralized there.
For example:
for VM instance creation:
* the instance name: VM_NAME
* the RAM and number of CPUs: VM_MEMORY, VM_CPU
for OAI variant build:
* build options: BUILD_OPTIONS
* build log file to parse: LOG_PATTERN
* the number of log files to parse: NB_PATTERN_FILES
You can get the list of variant specific variables specifying the variant argument when asking for help:
``` bash
./ci-scripts/oai-ci-vm-tool help variant
--variant flexran-rtc OR -v10 ( build and test non-OSA )
VM_NAME=ci-flexran-rtc ARCHIVES_LOC=flexran
VM_MEMORY=2048 VM_CPU=4
NB_PATTERN_FILES=1 BUILD_OPTIONS="cmake . && make -j2"
LOG_PATTERN=.txt
--variant enb-usrp OR -v1 ( build and test )
VM_NAME=ci-enb-usrp ARCHIVES_LOC=enb_usrp
VM_MEMORY=2048 VM_CPU=4
NB_PATTERN_FILES=9 BUILD_OPTIONS="--eNB -w USRP --mu"
LOG_PATTERN=.txt
--variant l1-sim OR -v20 ( test )
VM_NAME=ci-l1-sim ARCHIVES_LOC=l1_sim
VM_MEMORY=2048 VM_CPU=4
NB_PATTERN_FILES=9 BUILD_OPTIONS=""
LOG_PATTERN=.txt
--variant rf-sim OR -v21 ( test )
VM_NAME=ci-rf-sim ARCHIVES_LOC=rf_sim
VM_MEMORY=2048 VM_CPU=4
NB_PATTERN_FILES=9 BUILD_OPTIONS=""
LOG_PATTERN=.txt
--variant l2-sim OR -v22 ( test )
VM_NAME=ci-l2-sim ARCHIVES_LOC=l2_sim
VM_MEMORY=2048 VM_CPU=4
NB_PATTERN_FILES=9 BUILD_OPTIONS=""
LOG_PATTERN=.txt
--variant phy-sim OR -v3 ( build and test )
VM_NAME=ci-phy-sim ARCHIVES_LOC=phy_sim
VM_MEMORY=2048 VM_CPU=4
NB_PATTERN_FILES=3 BUILD_OPTIONS="--phy_simulators"
LOG_PATTERN=.txt
--variant cppcheck OR -v4 ( build and test )
VM_NAME=ci-cppcheck ARCHIVES_LOC=cppcheck
VM_MEMORY=4096 VM_CPU=4
NB_PATTERN_FILES=1 BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 --suppressions-list=ci-scripts/cppcheck_suppressions.list -I common/utils -j4"
LOG_PATTERN=cppcheck.xml
--variant enb-ethernet OR -v7 ( build and test )
VM_NAME=ci-enb-ethernet ARCHIVES_LOC=enb_eth
VM_MEMORY=4096 VM_CPU=4
NB_PATTERN_FILES=8 BUILD_OPTIONS="--eNB"
LOG_PATTERN=.txt
--variant ue-ethernet OR -v8 ( build and test )
VM_NAME=ci-ue-ethernet ARCHIVES_LOC=ue_eth
VM_MEMORY=4096 VM_CPU=4
NB_PATTERN_FILES=12 BUILD_OPTIONS="--UE"
LOG_PATTERN=.txt
```
To define a new variant you just need to define a function which name conforms to `function variant__v<n>__<variant_name>` where n and variant_name will respectively define the short and long options for your variant. The function only needs to define the variant dependent variables. For many variables, default values are set in the `check_set_variant` function. When a variant doesn't define the BUILD_OPTIONS variable it cannot be used for the `build` `wait` and `create` commands.
The main scripts also allows the definition of non variant-dependant variable via the `--setvar_<variable name> <variable value>` options.
You can get the list of these variables by using `help setvar`:
```BASH
./ci-scripts/oai-ci-vm-tool help setvar
--setvar_<varname> <value> where varname is one of:
VM_OSREL : OS release to use in virtual machines
RUN_EXPERIMENTAL : Enforce execution of variants with EXPERIMENTAL variable set to "true"
```
To add a new non-variant dependant variable you need:
* Add an item to the `AUTHORIZED_VAR` array
* In the `setvar_usage`function, add your help string in the HELP_VAR["<your variable name>"] variable.
* Write the bash code for your variable.
Example of non variant dependent usage:
``` bash
./ci-scripts/oai-ci-vm-tool test -v21 -ws /usr/local/oai/enhance_CI_extEPC/openairinterface5g -id 1 -jn testci
Currently testci-b1-rf-sim Testing is not implemented / enabled
Comment out these lines in ./ci-scripts/oai-ci-vm-tool if you want to run it
or use option --setvar_RUN_EXPERIMENTAL=true to test it
./ci-scripts/oai-ci-vm-tool test -v21 -ws /usr/local/oai/enhance_CI_extEPC/openairinterface5g -id 1 -jn testci --setvar_RUN_EXPERIMENTAL true
Setting RUN_EXPERIMENTAL to true...
############################################################
OAI CI VM script
############################################################
ENB_VM_NAME = testci-b1-enb-ethernet
ENB_VM_CMD_FILE = testci-b1-enb-ethernet_cmds.txt
UE_VM_NAME = testci-b1-ue-ethernet
UE_VM_CMD_FILE = testci-b1-ue-ethernet_cmds.txt
JENKINS_WKSP = /usr/local/oai/enhance_CI_extEPC/openairinterface5g
ARCHIVES_LOC = /usr/local/oai/enhance_CI_extEPC/openairinterface5g/archives/rf_sim/test
############################################################
Waiting for ENB VM to be started
...........................
```
In the same way, you can set the variable `VM_OSREL` to run the test in virtual machines of the specified OS release:
``` bash
./ci-scripts/oai-ci-vm-tool test -v21 -ws /usr/local/oai/enhance_CI_extEPC/openairinterface5g -id 1 -jn testci --setvar_VM_OSREL bionic
```
---
Next step: [how to create one or several VM instances](./vm_based_simulator_create.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI CI Virtual-Machine-based Simulator OAI source management</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
# 1. Introduction #
The idea of this section is to optimize/uniform source management for several VM instances.
If we were cloning the same repository in each VM we are creating, we would put so much pressure on the central GitLab repository.
The solution:
* clone/fetch on a given clean workspace and tar/zip only the source files without any artifacts.
* we then copy the tar/zip file to each VM instance
* and within each VM instance, unzip
# 2. Centralized Workspace #
You can create a brand new workspace by cloning:
```bash
$ mkdir /tmp/CI-raphael
$ cd /tmp/CI-raphael
$ git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git .
$ git checkout develop
```
You can also use your current cloned workspace and any `develop`-based branch.
```bash
$ cd /home/raphael/openairinterface5g
$ git fetch
$ git checkout develop-improved-documentation
# CAUTION: the following command will remove any file that has not already been added to GIT
$ sudo git clean -x -d -ff
$ git status
On branch develop-improved-documentation
Your branch is up-to-date with 'origin/develop-improved-documentation'.
nothing to commit, working directory clean
```
You can also have modified files.
**The main point is to have NO ARTIFACTS from a previous build in your workspace.**
Last point, the workspace folder name is not necesseraly `openairinterface5g`. But all the following commands will be run for the root of the workspace.
For clarity, I will always use `/tmp/CI-raphael` as $WORKSPACE.
# 3. Create the ZIP file #
```bash
# go to root of workspace
$ cd /tmp/CI-raphael
$ zip -r -qq localZip.zip .
```
The **Jenkins Pipeline** performs automatically these operations.
In addition, in case of a merge request, it tries to merge with the target branch and might create a dummy local commit.
See [section](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/ci/enb-master-job#32-verify-guidelines-stage)
---
Next step: [the main scripts](./vm_based_simulator_main_scripts.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="../../doc/images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI CI Virtual-Machine-based Test Environment: Testing an OAI variant</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
# 1. Introduction #
Currently 1 build variant can be directly tested:
* Physical Simulators
In addition, 2 build variants are used:
* OAI eNB with ETHERNET transport
* OAI UE with ETHERNET transport
for the following scenarios:
* L1 simulator w/ a channel simulator (NOT IMPLEMENTED)
* RF simulator : (IMPLEMENTED but not working as of 2019.w15)
* L2 nFAPI simulator
Tests are run sequentially in the Jenkins pipeline because:
* We want to mutualize the VM creation for an EPC
* We have seen performance issues when running in parallel.
```bash
./ci-scripts/oai-ci-vm-tool test --help
OAI CI VM script
Original Author: Raphael Defosseux
Requirements:
-- uvtool uvtool-libvirt apt-cacher
-- xenial image already synced
Default:
-- eNB with USRP
Usage:
------
oai-ci-vm-tool test [OPTIONS]
Options:
--------
--job-name #### OR -jn ####
Specify the name of the Jenkins job.
--build-id #### OR -id ####
Specify the build ID of the Jenkins job.
--workspace #### OR -ws ####
Specify the workspace.
# OpenAirInterface Build Variants
--variant enb-usrp OR -v1 ( build and test )
--variant phy-sim OR -v3 ( build and test )
--variant cppcheck OR -v4 ( build and test )
--variant gnb-usrp OR -v5 ( build and test )
--variant nr-ue-usrp OR -v6 ( build and test )
--variant enb-ethernet OR -v7 ( build and test )
--variant ue-ethernet OR -v8 ( build and test )
# non-OSA Build Variants
--variant flexran-rtc OR -v10 ( build and test non-OSA )
# OpenAirInterface Test Variants
--variant l1-sim OR -v20 ( test )
--variant rf-sim OR -v21 ( test )
--variant l2-sim OR -v22 ( test )
Specify the variant to build.
--keep-vm-alive OR -k
Keep the VM alive after the build.
--help OR -h
Print this help message.
```
# 2. Detailed Description #
Source file concerned: `ci-scripts/run_test_on_vm.sh`
**TBD when file is re-structured.**
# 3. Typical Usage #
## 3.1. Testing the physical simulators ##
```bash
$ ./ci-scripts/oai-ci-vm-tool test --workspace /var/jenkins/workspace/RAN-CI-develop --variant phy-sim --job-name RAN-CI-develop --build-id 47
12:54:29 ############################################################
12:54:29 OAI CI VM script
12:54:29 ############################################################
12:54:29 VM_NAME = RAN-CI-develop-b47-phy-sim
12:54:29 VM_CMD_FILE = RAN-CI-develop-b47-phy-sim_cmds.txt
12:54:29 JENKINS_WKSP = /var/jenkins/workspace/RAN-CI-develop
12:54:29 ARCHIVES_LOC = /var/jenkins/workspace/RAN-CI-develop/archives/phy_sim/test
12:54:29 ############################################################
12:54:29 Waiting for VM to be started
12:54:29 ############################################################
12:54:29 Warning: Permanently added '192.168.122.220' (ECDSA) to the list of known hosts.
12:54:30 RAN-CI-develop-b47-phy-sim has for IP addr = 192.168.122.220
...
13:04:48 Test Results are written to /home/ubuntu/tmp/cmake_targets/autotests/log/results_autotests.xml
13:05:00 ############################################################
13:05:00 Creating a tmp folder to store results and artifacts
13:05:00 ############################################################
13:05:00 /var/jenkins/workspace/RAN-CI-develop/archives/phy_sim/test /var/jenkins/workspace/RAN-CI-develop
13:05:04 /var/jenkins/workspace/RAN-CI-develop
13:05:04 ############################################################
13:05:04 Destroying VM
13:05:04 ############################################################
13:05:06 # Host 192.168.122.220 found: line 21
13:05:06 /home/eurecom/.ssh/known_hosts updated.
13:05:06 Original contents retained as /home/eurecom/.ssh/known_hosts.old
13:05:06 ############################################################
13:05:06 Checking run status
13:05:06 ############################################################
13:05:06 NB_FOUND_FILES = 1
13:05:06 NB_RUNS = 20
13:05:06 NB_FAILURES = 0
13:05:06 STATUS seems OK
```
Note that the VM instance is destroyed. You do that when you are sure your test is passing.
## 3.2. Test the RF simulator ##
```bash
./ci-scripts/oai-ci-vm-tool test --workspace /var/jenkins/workspace/RAN-CI-develop --variant rf-sim --job-name RAN-CI-develop --build-id 48 --keep-vm-alive
15:24:45 Currently RF-Simulator Testing is not implemented / enabled
15:24:45 Comment out these lines in ./ci-scripts/oai-ci-vm-tool if you want to run it
15:24:45 STATUS seems OK
```
## 3.3. Testing the L2-nFAPI simulator
```bash
./ci-scripts/oai-ci-vm-tool test --workspace /var/jenkins/workspace/RAN-CI-develop --variant l2-sim --job-name RAN-CI-develop --build-id 48
15:24:47 ############################################################
15:24:47 OAI CI VM script
15:24:47 ############################################################
15:24:47 ENB_VM_NAME = RAN-CI-develop-b48-enb-ethernet
15:24:47 ENB_VM_CMD_FILE = RAN-CI-develop-b48-enb-ethernet_cmds.txt
15:24:47 UE_VM_NAME = RAN-CI-develop-b48-ue-ethernet
15:24:47 UE_VM_CMD_FILE = RAN-CI-develop-b48-ue-ethernet_cmds.txt
15:24:47 JENKINS_WKSP = /var/jenkins/workspace/RAN-CI-develop
15:24:47 ARCHIVES_LOC = /var/jenkins/workspace/RAN-CI-develop/archives/l2_sim/test
15:24:47 ############################################################
15:24:47 Waiting for ENB VM to be started
15:24:47 ############################################################
15:24:47 Warning: Permanently added '192.168.122.110' (ECDSA) to the list of known hosts.
15:24:48 RAN-CI-develop-b48-enb-ethernet has for IP addr = 192.168.122.110
15:24:48 ############################################################
15:24:48 Waiting for UE VM to be started
15:24:48 ############################################################
15:24:49 Warning: Permanently added '192.168.122.90' (ECDSA) to the list of known hosts.
15:24:50 RAN-CI-develop-b48-ue-ethernet has for IP addr = 192.168.122.90
15:24:50 ############################################################
15:24:50 Test EPC on VM (RAN-CI-develop-b48-epc) will be using ltebox
15:24:50 ############################################################
15:24:50 EPC_VM_CMD_FILE = RAN-CI-develop-b48-epc_cmds.txt
15:24:50 Waiting for VM to be started
15:24:50 Warning: Permanently added '192.168.122.156' (ECDSA) to the list of known hosts.
15:24:51 RAN-CI-develop-b48-epc has for IP addr = 192.168.122.156
...
15:42:44 ############################################################
15:42:44 Destroying VMs
15:42:44 ############################################################
15:42:46 # Host 192.168.122.110 found: line 18
15:42:46 /home/eurecom/.ssh/known_hosts updated.
15:42:46 Original contents retained as /home/eurecom/.ssh/known_hosts.old
15:42:47 # Host 192.168.122.90 found: line 18
15:42:47 /home/eurecom/.ssh/known_hosts updated.
15:42:47 Original contents retained as /home/eurecom/.ssh/known_hosts.old
15:42:47 ############################################################
15:42:47 Checking run status
15:42:47 ############################################################
15:42:47 STATUS failed?
```
---
Final step: [how to properly destroy all VM instances](./vm_based_simulator_destroy.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
......@@ -287,6 +287,8 @@ def GetParametersFromXML(action):
#CiTestObj.air_interface = 'ocp-enb'
logging.error('OCP UE -- NOT SUPPORTED')
CiTestObj.cmd_prefix = test.findtext('cmd_prefix') or ""
elif action == 'Terminate_OAI_UE':
UE_instance=test.findtext('UE_instance')
if (UE_instance is None):
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
#/*
# * 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
# */
function wait_usage {
echo "OAI CI VM script"
echo " Original Author: Raphael Defosseux"
echo " Requirements:"
echo " -- uvtool uvtool-libvirt apt-cacher"
echo " -- $VM_OSREL image already synced"
echo " Default:"
echo " -- eNB with USRP"
echo ""
echo "Usage:"
echo "------"
echo " oai-ci-vm-tool wait [OPTIONS]"
echo ""
command_options_usage
}
function wait_on_vm_build {
echo "############################################################"
echo "OAI CI VM script"
echo "############################################################"
echo "VM_NAME = $VM_NAME"
echo "VM_CMD_FILE = $VM_CMDS"
echo "JENKINS_WKSP = $JENKINS_WKSP"
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-basic-sim"* ]] || [[ "$VM_NAME" == *"-flexran-rtc"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] || [[ "$VM_NAME" == *"rf5g-sim"* ]] || [[ "$VM_NAME" == *"gnb-usrp"* ]] || [[ "$VM_NAME" == *"nr-ue-usrp"* ]]
then
echo "This VM type is no longer supported in the pipeline framework"
return
fi
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
if [ $IS_VM_ALIVE -eq 0 ]
then
echo "############################################################"
echo "You should have created the VM before doing anything"
echo "############################################################"
STATUS=1
return
fi
echo "Waiting for VM to be started"
uvt-kvm wait $VM_NAME --insecure
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
echo "############################################################"
echo "Waiting build process to end on VM ($VM_NAME)"
echo "############################################################"
# Since the last VM was cppcheck and is removed
# we are going too fast in wait and the build_oai is not yet started
sleep 120
if [[ "$VM_NAME" == *"-cppcheck"* ]]
then
echo "echo \"ps -aux | grep cppcheck \"" >> $VM_CMDS
echo "while [ \$(ps -aux | grep --color=never cppcheck | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
else
echo "echo \"ps -aux | grep build \"" >> $VM_CMDS
echo "while [ \$(ps -aux | grep --color=never build_oai | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
fi
echo "echo \"df -h\"" >> $VM_CMDS
echo "df -h" >> $VM_CMDS
ssh -T -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
rm -f $VM_CMDS
}
function check_on_vm_build {
if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-basic-sim"* ]] || [[ "$VM_NAME" == *"-flexran-rtc"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] || [[ "$VM_NAME" == *"rf5g-sim"* ]] || [[ "$VM_NAME" == *"gnb-usrp"* ]] || [[ "$VM_NAME" == *"nr-ue-usrp"* ]]
then
echo "This VM type is no longer supported in the pipeline framework"
return
fi
echo "############################################################"
echo "Creating a tmp folder to store results and artifacts"
echo "############################################################"
if [ ! -d $JENKINS_WKSP/archives ]
then
mkdir $JENKINS_WKSP/archives
fi
if [ ! -d $ARCHIVES_LOC ]
then
mkdir $ARCHIVES_LOC
fi
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC
if [[ "$VM_NAME" == *"-cppcheck"* ]]
then
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC
fi
if [ $KEEP_VM_ALIVE -eq 0 ]
then
if [[ "$VM_NAME" == *"-enb-ethernet"* ]] || [[ "$VM_NAME" == *"-ue-ethernet"* ]]
then
echo "Hack to not destroy in current pipeline"
else
echo "############################################################"
echo "Destroying VM"
echo "############################################################"
uvt-kvm destroy $VM_NAME
ssh-keygen -R $VM_IP_ADDR
fi
fi
rm -f $VM_CMDS
echo "############################################################"
echo "Checking build status"
echo "############################################################"
if [[ "$VM_NAME" == *"-cppcheck"* ]]
then
LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml`
else
LOG_FILES=`ls $ARCHIVES_LOC/*.txt`
fi
echo "LOG_FILES=$LOG_FILES"
echo "expecting NB_PATTERN_FILES=$NB_PATTERN_FILES"
STATUS=0
NB_FOUND_FILES=0
for FULLFILE in $LOG_FILES
do
if [[ $FULLFILE == *"$LOG_PATTERN"* ]]
then
filename=$(basename -- "$FULLFILE")
if [ "$LOG_PATTERN" == ".txt" ]
then
PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"`
fi
if [ "$LOG_PATTERN" == "cppcheck.xml" ]
then
PASS_PATTERN="results version"
LOCAL_STAT=`egrep -c "$PASS_PATTERN" $FULLFILE`
else
LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE`
fi
if [ $LOCAL_STAT -eq 0 ]; then
echo "WARNING: file $filename does not contain pass pattern"
else
NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
fi
fi
done
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]
then
echo "Expecting $NB_PATTERN_FILES log files and found $NB_FOUND_FILES"
STATUS=-1
fi
# If we were building the FlexRan Controller, flag-touch for basic-simulator to continue
#if [[ "$VM_NAME" == *"-flexran-rtc"* ]]
#then
# if [[ $STATUS -eq 0 ]]
# then
# touch $JENKINS_WKSP/flexran/flexran_build_complete.txt
# fi
#fi
if [[ "$VM_NAME" == *"-cppcheck"* ]]
then
echo "COMMAND: cppcheck $BUILD_OPTIONS . 2> cppcheck.xml" > $ARCHIVES_LOC/build_final_status.log
elif [[ "$VM_NAME" == *"-flexran-rtc"* ]]
then
echo "COMMAND: $BUILD_OPTIONS" > $ARCHIVES_LOC/build_final_status.log
else
echo "COMMAND: build_oai -I $BUILD_OPTIONS" > $ARCHIVES_LOC/build_final_status.log
fi
if [[ $STATUS -eq 0 ]]
then
echo "BUILD_OK" >> $ARCHIVES_LOC/build_final_status.log
else
echo "BUILD_KO" >> $ARCHIVES_LOC/build_final_status.log
fi
}
<!--
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
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-tdd-2x2</htmlTabRef>
<htmlTabName>Monolithic SA TDD 2x2 gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
111111
100001
000000
000001
000002
000003
020001
020002
030001
030002
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000000">
<class>DeployGenObject</class>
<desc>Deploy MySql Database</desc>
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
<services>mysql</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000001">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
<nb_healthy>6</nb_healthy>
</testCase>
<testCase id="000002">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G gNB RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
<services>oai-gnb</services>
<nb_healthy>7</nb_healthy>
</testCase>
<testCase id="000003">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>8</nb_healthy>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping ext-dn from NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-I oaitun_ue1 -c 20 192.168.72.135</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="020002">
<class>PingFromContainer</class>
<desc>Ping NR-UE from ext-dn</desc>
<container_name>rfsim5g-oai-ext-dn</container_name>
<options>-c 20 12.1.1.2</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="030001">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
<client_options>-c 12.1.1.2 -u -i 1 -t 10 -b 3M</client_options>
</testCase>
<testCase id="030002">
<class>IperfFromContainer</class>
<desc>Iperf UDP Uplink</desc>
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
<server_options>-u -i 1 -s</server_options>
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 10 -b 1M</client_options>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
<d_retx_th>1,0,0,0</d_retx_th>
<u_retx_th>1,0,0,0</u_retx_th>
</testCase>
</testCaseList>
<!--
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
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-2x2-down</htmlTabRef>
<htmlTabName>CleanUp SA Monolithic TDD 2x2 gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100002">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>
<!--
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
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-tdd-u0-25prb</htmlTabRef>
<htmlTabName>Monolithic SA TDD u0 25PRB gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
111111
100001
000000
000001
000002
000003
020001
020002
030001
030002
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000000">
<class>DeployGenObject</class>
<desc>Deploy MySql Database</desc>
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
<services>mysql</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000001">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
<nb_healthy>6</nb_healthy>
</testCase>
<testCase id="000002">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G gNB RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
<services>oai-gnb</services>
<nb_healthy>7</nb_healthy>
</testCase>
<testCase id="000003">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>8</nb_healthy>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping ext-dn from NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-I oaitun_ue1 -c 20 192.168.72.135</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="020002">
<class>PingFromContainer</class>
<desc>Ping NR-UE from ext-dn</desc>
<container_name>rfsim5g-oai-ext-dn</container_name>
<options>-c 20 12.1.1.2</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="030001">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
<client_options>-c 12.1.1.2 -u -i 1 -t 10 -b 3M</client_options>
</testCase>
<testCase id="030002">
<class>IperfFromContainer</class>
<desc>Iperf UDP Uplink</desc>
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
<server_options>-u -i 1 -s</server_options>
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 10 -b 1M</client_options>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
<d_retx_th>1,0,0,0</d_retx_th>
<u_retx_th>1,0,0,0</u_retx_th>
</testCase>
</testCaseList>
<!--
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
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-u0-25prb-down</htmlTabRef>
<htmlTabName>CleanUp SA Monolithic TDD u0 25PRB gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100002">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>
......@@ -61,6 +61,7 @@
<eNB_Trace>yes</eNB_Trace>
<eNB_Stats>yes</eNB_Stats>
<USRP_IPAddress>172.21.19.14</USRP_IPAddress>
<cmd_prefix>numactl --cpunodebind=netdev:ens2f0np0 --membind=netdev:ens2f0np0</cmd_prefix>
</testCase>
<testCase id="000001">
......
This diff is collapsed.
......@@ -838,21 +838,6 @@ install_simde_from_source(){
cd /tmp/simde
# brute force copy into /usr/include
$SUDO \cp -rv ../simde /usr/include
$SUDO patch /usr/include/simde/x86/avx.h << FIN
--- /usr/include/simde/x86/avx.h.old 2022-10-03 19:17:39.828223432 +0200
+++ /usr/include/simde/x86/avx.h 2022-10-05 16:19:55.086019445 +0200
@@ -3643,6 +3643,9 @@
simde__m256i simde_mm256_insertf128_si256(simde__m256i a, simde__m128i b, int im
return simde__m256i_from_private(a_);
}
+#if defined(SIMDE_X86_AVX_NATIVE)
+ #define simde_mm256_insertf128_si256(a, b, imm8) _mm256_insertf128_si256(a, b, imm8)
+#endif
#if defined(SIMDE_X86_AVX_ENABLE_NATIVE_ALIASES)
#undef _mm256_insertf128_si256
#define _mm256_insertf128_si256(a, b, imm8) simde_mm256_insertf128_si256(a, b, imm8)
FIN
}
#################################################
......
......@@ -34,7 +34,7 @@
#define __RAN_CONTEXT_H__
#include <pthread.h>
#include "COMMON/platform_constants.h"
#include "common/platform_constants.h"
#include "PHY/defs_eNB.h"
#include "PHY/types.h"
#include "PHY/impl_defs_top.h"
......@@ -111,4 +111,5 @@ typedef struct {
extern RAN_CONTEXT_t RC;
#define NB_eNB_INST RC.nb_inst
#endif
......@@ -165,8 +165,7 @@ void measurcmd_display_rlcstats(telnet_printfunc_t prnt) {
statsptr[i].vptr = rlcstats + i;
}
for (int UE_id=UE_info->list.head; UE_id>=0; UE_id=UE_info->list.next[UE_id]) {
#define NB_eNB_INST 1
for (int UE_id = UE_info->list.head; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) {
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt,eNB_id, ENB_FLAG_YES,UE_info->eNB_UE_stats[0][UE_id].crnti,
eNB->frame,eNB->subframe,eNB_id);
measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DCCH", &ctxt, SRB_FLAG_YES, DCCH);
......
......@@ -2110,7 +2110,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED/nfapi_lte_dummy.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED/sched_eNB.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED/phy_procedures_lte_common.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED/sched_common_vars.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED/phy_procedures_lte_eNb.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED/sched_common_extern.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED/nfapi_nr_dummy.c \
......@@ -2438,7 +2437,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/MODULATION/nr_modulation.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/MODULATION/slot_fep.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/MODULATION/ul_7_5_kHz.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/MODULATION/modulation_vars.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/MODULATION/slot_fep_ul.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/phy_extern.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/defs_UE.h \
......
......@@ -55,8 +55,6 @@
#include <openair1/PHY/phy_extern_ue.h>
#include "PHY/phy_vars.h"
#include "SCHED/sched_common_vars.h"
#include "LAYER2/MAC/mac_vars.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
......@@ -107,6 +105,7 @@ uint16_t runtime_phy_tx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75,
int oai_exit = 0;
int NB_UE_INST = 0;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
......
This diff is collapsed.
......@@ -69,7 +69,7 @@ extern double cpuf;
#define FRAME_PERIOD 100000000ULL
#define DAQ_PERIOD 66667ULL
#define FIFO_PRIORITY 40
#define NB_THREAD_INST 1
typedef enum {
pss=0,
pbch=1,
......
This diff is collapsed.
......@@ -60,7 +60,6 @@ static int DEFENBS[] = {0};
#include <openair2/UTIL/OPT/opt.h>
#include <openair1/SIMULATION/TOOLS/sim.h>
#include <openair1/PHY/phy_vars.h>
#include <openair1/SCHED/sched_common_vars.h>
#include <openair2/LAYER2/MAC/mac_vars.h>
#include <openair2/RRC/LTE/rrc_vars.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -32,7 +32,7 @@
# if 1 // for hard-code (remove later)
#include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h"
#include "common/platform_constants.h"
#include "common/ran_context.h"
#include "common/utils/LOG/log.h"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment