Skip to content

software/simpleran: do not run Amarisoft init scripts with lte_mock

Lu Xu requested to merge lu.xu/slapos:simpleran-mock-no-sudo into master

Problem

The enb wrapper runs sudo -n /opt/amarisoft/rm-tmp-lte enb. The ue wrapper runs sudo /opt/amarisoft/rm-tmp-lte ue. rm-tmp-lte removes /tmp/.lte$1*. These files belong to all Amarisoft services on the host, in all partitions.

The SR tests use lte_mock, but the wrappers still run rm-tmp-lte, init-sdr and init-enb. When a node runs the SR tests and a real lteenb, the test removes the files of the real lteenb. The real lteenb then stops with "License error: runtime error (...) Runtime error 7". On simbox006, each SR test run stopped the real enb in slappart2.

Changes

  1. The [amarisoft] section of instance.cfg gives the mock option. The value is true when lte_mock is set, and empty when it is not.
  2. When mock is set, these wrappers do not run the scripts in amarisoft['dir']:
    • enb: rm-tmp-lte, init-sdr, init-enb
    • ue: rm-tmp-lte, init-sdr, init-ue
    • core-network (mme and ims): init-mme
    • test-model: init-sdr, init-enb
  3. Without lte_mock, the generated wrappers are the same as before.
  4. The enb tests of test.py and test_ors.py set com_ws_port to 9101. The default address is 127.0.1.2:9001, and a real lteenb on the test node can use the same address. Then the amarisoft statistics come from the real lteenb and not from the mock. The check-baseband-latency and rx-saturated promises fail, and setUpClass of the enb and gnb tests fails.
  5. test_enb_sh_wrapper_mock and test_ue_sh_wrapper_mock verify that the wrappers of a mock instance do not call rm-tmp-lte, init-sdr, init-enb, init-ue or init-mme.

Test

Test suite: https://erp5js.nexedi.net/#/test_suite_module/2449

Merge request reports