Skip to content
Unstable

Changes

Summary

  1. testenv: on crash, wait until test stopped (details)
  2. testenv: display current test name on ^C (details)
  3. library/PFCP_Templates: fix missing fields in (details)
  4. library/s1ap: fix formatting in ts_S1AP_RABSetupItemCtxtSURes (details)
  5. sgsn/SGSN_Tests: remove a superfluous/wrong comment (details)
  6. asterisk: TC_ims_reregistration: Expect re-register using existing ipsec (details)
  7. testenv: get coredump + backtrace on crash (details)
  8. library/s1ap: add E-RAB RELEASE templates (details)
  9. s1gw: derive functions from f_TC_e_rab_setup() (details)
  10. s1gw: fix TC_e_rab_setup: handle PFCP Session related PDUs (details)
  11. s1gw: TC_e_rab_setup: also test E-RAB release (details)
  12. s1gw: add TC_e_rab_setup3 (3 E-RABs at a time) (details)
  13. deps/update.sh: split update cmds from Makefile (details)
  14. deps/update: don't fetch repos where COMMIT exists (details)
  15. deps: make output readable (details)
  16. deps/update: skip checkout if nothing to do (details)
  17. Makefile: avoid fetching deps if not needed (details)
  18. .gitignore: ignore '.make.*' files (like .make.deps) (details)
  19. .gitignore: ignore ctags (details)
  20. Remove dead links and generated code in bin/* (details)
  21. {bsc-nat,selftest,sysinfo}/gen_links.sh: use bash, not sh (details)
  22. gen_links.sh.inc: 'set -e' to abort on error (details)
  23. testenv: testsuite: use rsync with --archive (details)
  24. testenv/README: consistency fix (details)
  25. testenv: podman.exec_cmd: better error if stopped (details)
  26. testenv/README: deduplicate clean= description (details)
  27. testenv/README: document current working dir (details)
  28. testenv: clean_run_scripts: skip if podman stopped (details)
  29. testenv: copy=: support copying directories too (details)
  30. ggsn: sync GGSN_Tests.cfg with docker-playground (details)
  31. ggsn: add testenv.cfgs for osmo-ggsn (details)
  32. ggsn: add testenv.cfg for open5gs (details)
  33. pcap-client: initial testenv.cfg (details)
  34. ruff.toml: new file (details)
  35. Cosmetic: testenv: fix line length (details)
  36. testenv: improve --config argument parsing (details)
  37. ggsn: testenv: fix paths in copy= and clean= (details)
  38. ggsn: testenv: add libosmocore-utils to package= (details)
  39. library: add generic Mutex API for parallel components (details)
  40. library/PFCP_Emulation: a better PDU routing concept (details)
  41. library: as_pfcp_ignore(): log SeqNr of received PDUs (details)
  42. s1gw: f_init_pfcp(): use 'PFCPEM' as the prefix (details)
  43. s1gw: make number of eNBs configurable via module params (details)
  44. Revert "s1gw: cache PFCP Recovery Timestamp in ConnHdlr" (details)
  45. s1gw: move PFCP association handling into a dedicated ConnHdlr (details)
  46. s1gw: add multi-eNB variants of TC_e_rab_setup (details)
  47. s1gw: add f_ConnHdlrList_all_done() (details)
  48. s1gw: f_ConnHdlr_rx_erab_release_cmd(): fix wrong template (details)
  49. s1gw: add TC_e_rab_release_ind (details)
  50. s1gw: f_ConnHdlr_erab_release_cmd(): add missing logging (details)
  51. library/s1ap: fix wrong IE ID in E-RABReleaseListBearerRelComp (details)
  52. library/s1ap: fix wrong field in S1AP-RABReleaseInd (details)
  53. library/s1ap: add templates for INITIAL CONTEXT SETUP (details)
  54. library/s1ap: fix wrong IDs in {ts,tr}_S1AP_InitialCtxSetupResp (details)
  55. library/s1ap: comment out optional IE in tr_S1AP_InitialCtxSetupResp (details)
  56. library/pfcp: fix template restriction in PFCP_Session_Est_Resp (details)
  57. library/pfcp: make Cause IE configurable in all templates (details)
  58. s1gw: TC_e_rab_setup: complete E-RAB release (details)
  59. s1gw: separate f_ConnHdlr_session_{establish,modify}() (details)
  60. s1gw: add testcases for INITIAL CONTEXT SETUP (details)
  61. testenv: podman: disable send_redirects (details)
  62. s1gw: add TC_initial_ctx_setup_failure (details)
  63. s1gw: move MME_UE_S1AP_ID to ConnHdlrPars (details)
  64. testenv: requirements: find programs in /usr/sbin (details)
  65. testenv: podman: remove mongodb-org.list (details)
  66. testenv: podman: don't install GUI packages (details)
  67. ggsn: osmo-ggsn.src.cfg: tweak log output (details)
  68. ggsn: testenv: replace dummy netdev with bridge (details)
  69. testenv: osmo-dev: build with gtp_linux.opts (details)
  70. testenv: bridge: change default IPs 201 -> 1 (details)
  71. ggsn: testenv: run SUT on bridge instead of lo (details)
  72. ggsn: testenv: change VTY IP (details)
  73. testenv: support running SUT in QEMU (details)
  74. ggsn: testenv: support running osmo-ggsn in QEMU (details)
  75. Cosmetic: ggsn: fix copy paste error (details)
  76. L3_Templates: GMM: fix off-by-one error in ServiceType IE (details)
  77. update osmo-stp.cfg to make STP_Tests work at all again (details)
  78. Replace libosmo-sccp references with libosmo-sigtran (details)
  79. _testenv: Avoid running make check when building IUT (details)
  80. stp: Support running with testenv (details)
  81. library/GTPv1U_Templates: support sending ext hdrs (details)
  82. testenv: podman: restart_count in container_name (details)
  83. sgsn: Validate TLI received in RAB Ass Req (details)
  84. sgsn: Test tx Rab Ass Resp with ITU X.213 IPv4 address format (details)
  85. sgsn: Introduce test TC_attach_pdp_act_user_addr_itu_x213_ipv4toolarge (details)
  86. sgsn: Improve validation of TLA encoded in RAB Ass Req (details)
  87. cosmetic: sgsn: Fix indenation whitespace (details)
  88. ggsn: README: document how to run with testenv (details)
  89. library/GTPv1C_Templates: Lots of improvements in template declarations (details)
  90. cosmetic: library/GTPv1C_Templates: remove extra indentation level (details)
  91. library/GTPv1C_Templates: Clean up PCO templates (details)
  92. mgw: Remove unneeded dep IPCP_Types.ttcn (details)
  93. s1gw: Remove unneeded dep IPCP_Types.ttcn (details)
  94. library: Move IPCP templates GTPv1C_Templates.ttcn -> (details)
  95. library/PCO_Types: Drop unused nonsense enum (details)
  96. library/PCO_Types.ttcn: Drop unsued IPCP_OPT enum (details)
  97. ggsn: Introduce test TC_pdp4(6)_act_deact_mtu (details)
  98. ggsn: Validate MTU sent during ICMPv6 RA (details)
  99. ggsn: Request osmo-ggsn to apply the MTU on the tundev (details)
  100. ctrl: tweak errmsg for counter mismatch (details)
  101. testenv: qemu: get coredump and show backtrace (details)
  102. pcu: add testenv.cfg (details)
  103. bsc/osmo-bsc-sccplite.cfg: add trx1, trx2 (details)
  104. bsc/osmo-bsc{,-vamos}.cfg: add no missing-msc-text (details)
  105. bsc/osmo-stp.cfg: sync with docker-playground (details)
  106. bsc: add testenv.cfg (details)
  107. testenv: improve output for missing -c argument (details)
  108. testenv: osmo-dev: add hint for gen_makefile fail (details)
  109. hnbgw: Support testenv (details)
  110. testenv: remove dead code for [testsuite] prepare= (details)
  111. testenv: add proper [testsuite] prepare= support (details)
  112. hnbgw: Split ConnHdlr component code to its own file (details)
  113. RAN_Emulation: Introduce field ranap_connect_ind_auto_res (details)
  114. hnbgw: Allow modifying RanOps during test startup (details)
  115. Convert RAN_Conn_Prim from enum to union (details)
  116. RAN_Emulation: Allow setting reason in primitive MSC_CONN_PRIM_DISC_REQ (details)
  117. hnbgw: Fix TC_ranap_ps_mo_disconnect testing CS instead of PS (details)
  118. hnbgw: Drop unused template (details)
  119. hnbgw: Introduce test TC_ranap_{cs,ps}_creq_cref (details)
  120. hnbgw: Set sccp_addr parameters during init (details)
  121. hbngw: Store IuSigConid in ConnHdlr params (details)
  122. RANAP_Templates: Add templates for ResetResource(Ack) (details)
  123. RAN_Emulation: Support registering IuSigConId for connectionless RANAP (details)
  124. s1gw: use the new counter name (out_pkt.forward.unmodified) (details)
  125. RUA_Emulation: Support passing no RANAP PDU in RUA_Disc_Req (details)
  126. hnbgw: Add missing timer stop after use (details)
  127. hnbgw: Get rid of pars param in void_fn (details)
  128. testenv: run podman command with logfile (details)
  129. library/s1ap: fix wrong IE criticality in templates (details)
  130. library/s1ap: rework {ts,tr}_S1AP_RABSetupRsp templates (details)
  131. s1gw: add TC_e_rab_setup_failure (details)
  132. hnbgw: test for RUA Disconnect when there is no CN (details)
  133. hnbgw: Send meaningful RANAP messages in f_tc_ranap_mo_disconnect() (details)
  134. hnbgw: Introduce test TC_cs_iu_release_req_rua_disconnect (details)
  135. hnbgw: fixup for expect_compl_l3_success (details)
  136. hnbgw: Rename RAB helper functions to be CS specific (details)
  137. hnbgw: Use g_pars.mgcp_pars directly during RAB CS setup (details)
  138. hnbgw/expected-results: update (details)
  139. testenv: make podman stop more robust (details)
  140. hnbgw: Move gtp_pars to Connhdlr (details)
  141. hnbgw: Introduce PfcpParameters in TestHdlrParameters (details)
  142. bsc: testenv: set MTU=1500 for lo (details)
  143. hnbgw: Merge TC_ps_rab_assignment_* testcases (details)
  144. hnbgw: Move normal condition Iu Release procedure to helper function (details)
  145. hnbgw: Tear down SCCP conn from CN under normal conditions (details)
Commit 96e7bf4e978d5a0b0126efc34b8f2abd27ff43ee by laforge
testenv: on crash, wait until test stopped

When the IUT (or other test component) crashes, wait until
ttcn3-tcpdump-stop.sh has closed the pcap, as otherwise the last
buffered data may be lost.

Add a timeout of 2 minutes in case the test doesn't stop on its own.

I considered making this feature optional, but impatient users can still
immediately kill everything with ^C.

Change-Id: If49263869b1d46103813e9d06deff47f8ba72896
The file was modified_testenv/testenv/daemons.py
The file was modifiedttcn3-tcpdump-stop.sh
The file was modified_testenv/testenv/testsuite.py
The file was modifiedttcn3-tcpdump-start.sh
Commit 33dfe43fdc8d2ad320ef7bd742f5611aa5642620 by laforge
testenv: display current test name on ^C

When running a whole testsuite and getting a lot of output, it can be
useful to know which test was currently running when pressing ^C. Now
that we have a function that provides this information, show it to the
user.

Change-Id: I2eb639f47440447ac71027956b9c234323565956
The file was modified_testenv/testenv.py
Commit 74d8e4249de308128041462c59acbcbab5cfe2e4 by Vadim Yanitskiy
library/PFCP_Templates: fix missing fields in {ts,tr}_PFCP_Session_Est_Resp

Change-Id: Ib0887f1150f87746f9048f2944cd18c65224a4c7
The file was modifiedhnbgw/HNBGW_Tests.ttcn
The file was modifiedlibrary/PFCP_Templates.ttcn
Commit dc3ae29fcb09fd5c42c641d154f64fcb23cd7524 by Vadim Yanitskiy
library/s1ap: fix formatting in ts_S1AP_RABSetupItemCtxtSURes

Change-Id: Ie6a367841a927ee0b542ccff2d6eb4ab9e51ca12
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit e89e06f003c042557858c8fd3456fac1a098c6e9 by lynxis
sgsn/SGSN_Tests: remove a superfluous/wrong comment

Change-Id: Ib1cdea68e534bcf33aaeb8635d85f1f02cacb148
The file was modifiedsgsn/SGSN_Tests.ttcn
Commit 55bade7a4ef6891410187c90b17e8ee612fcba80 by Pau Espin Pedrol
asterisk: TC_ims_reregistration: Expect re-register using existing ipsec ctx

Change-Id: I8d100dbba6cddfa5f31437c9cdc8c48f1bbd5701
The file was modifiedasterisk/Asterisk_Tests.ttcn
The file was modifiedasterisk/IMS_ConnectionHandler.ttcn
Commit d7531335952fd993f56d7632f8c96bf505c765eb by Oliver Smith
testenv: get coredump + backtrace on crash

If the SUT or another test component crashes, check if a matching
coredump was registered in coredumpctl. If that is the case, then copy
it into the testdir and print + store the backtrace.

This solves the problem that it is especially tricky to get a good
backtrace when a component crashes inside a container. One needs to
grab the coredump from the host (usually handled by systemd-coredump,
we cannot override /proc/sys/kernel/core_pattern for containers so it
can't be handled in the container), then put the coredump into the
container and finally run gdb to get the backtrace inside the container
(where proper libraries and debug symbols are). This patch automates all
of these steps.

Pau requested this feature.

Related: OS#6494
Change-Id: I743c20968bda9b6d6fb9c2d23bef70ee11950761
The file was modified_testenv/testenv/daemons.py
The file was added_testenv/testenv/coredump.py
The file was modified_testenv/data/podman/Dockerfile
The file was modified_testenv/testenv/podman.py
Commit e59e681c26352fdf5054aedd76dd7b562897335b by laforge
library/s1ap: add E-RAB RELEASE templates

Change-Id: I2e9305da80934ea68e3eca8215a9c16de48b37fd
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit 7dd49ba289b8423e51f6b71996aa5057ae6cada2 by laforge
s1gw: derive functions from f_TC_e_rab_setup()

... to avoid code duplication when adding more E-RAB related TCs.

While at it, allow establishing multiple E-RABs.

Change-Id: I1bff371da6337ecd7710219d1c86f0fff82ad17f
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifieds1gw/S1GW_Tests.ttcn
Commit c8d310d7a71739fdad9292ac6678352d2093b453 by laforge
s1gw: fix TC_e_rab_setup: handle PFCP Session related PDUs

S1GW_Tests.TC_e_rab_setup is failing since we introduced the PFCP
support to osmo-s1gw.  The IUT now requires co-located UPF, which
we need to emulate in the testsuite.

This patch patch adds the following API:

* S1GW_ConnHdlr.f_ConnHdlr_rx_session_establish_req(),
* S1GW_ConnHdlr.f_ConnHdlr_tx_session_establish_resp(),
* S1GW_ConnHdlr.f_ConnHdlr_rx_session_modify_req(),
* S1GW_ConnHdlr.f_ConnHdlr_tx_session_modify_resp(),

and makes use of it in S1GW_Tests.TC_e_rab_setup.

Change-Id: Ibbb326badaa1e3df968c137f3e4b576ca5c6f94d
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifieds1gw/S1GW_Tests.ttcn
Commit a99224c9464bdb54760ed87f9b3b20268bffb25f by laforge
s1gw: TC_e_rab_setup: also test E-RAB release

* s1ap: add E-RAB RELEASE API
* pfcp: add PFCP Session Deletion API
* s1gw: make use of this API in TC_e_rab_setup

Change-Id: Id995c51d8ac76316f41ef49d35380a2521d5ae19
The file was modifieds1gw/S1GW_Tests.ttcn
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
Commit c97bc1db966b2a2f102d3190f1d0c096e7c92933 by laforge
s1gw: add TC_e_rab_setup3 (3 E-RABs at a time)

The idea is to verify setup and release of 3 E-RABs at a time.

Change-Id: I6a0a10f826309d8a952c77c23170df3d201e7640
The file was modifieds1gw/S1GW_Tests.ttcn
The file was modifieds1gw/expected-results.xml
Commit 5b3246910ea63dfc9abbafb2e1836484c3e9cd8a by Oliver Smith
deps/update.sh: split update cmds from Makefile

Move the inline shell commands from the Makefile to a separate script,
so they are easier to edit and maintain. Proper syntax highlighting, no
need for all the backslashes + &&, etc.

Change-Id: Ifab1158000ccb39f0b384bbd81841e417ed24f37
The file was modifieddeps/Makefile
The file was addeddeps/update.sh
Commit 68b83cd3f62619f764642f5aab491415d3065051 by Oliver Smith
deps/update: don't fetch repos where COMMIT exists

Instead of unconditionally fetching each git repository, check if the
commit we want to checkout already exists in the git repository. If that
is the case, then don't fetch it.

Related: OS#6572
Change-Id: I342957668892e7d29666fada82362cb4a6c7aac5
The file was modifieddeps/update.sh
Commit ebed76d72ac0e1467b1228146c44f0a1c8b34a29 by Oliver Smith
deps: make output readable

Instead of having a silent fetch and commits printed to stdout without
information about the repository they belong to, change the output to
have one line per git action and to include the repository name in each
of them.

Example output:

[titan.ProtocolEmulations.M3UA] Checking out b58f92046e48a7b1ed531e243a2319ebca53bf4c
[titan.ProtocolModules.IP] Checking out 1be86705f39ae38f3c04b2109806ee20d25e91d0
[titan.ProtocolModules.GTP_v13.5.0] Checking out 6b769f985eb91bf5a4332f29faa4a043b23ce62e
[titan.ProtocolModules.ICMP] Checking out e49d9fb9f7de637b4bf4803dc6b6e911a8661640
[osmo-uecups] Initial git clone
[titan.ProtocolModules.DIAMETER_ProtocolModule_Generator] Checking out ffd939595a08da1b8c8176aaa1f8578bfe02a912
[titan.ProtocolModules.L2TP] Checking out 17e76d3662bd0bb815158e8a9de1ec413f21b530
[titan.ProtocolModules.ICMPv6] Checking out 46f4d9b6e1e3c794294a92588401a81e4881dd27
[titan.ProtocolModules.LLC_v7.1.0] Checking out 09817f113255d7fb56f1d45d3dd629a093d9248d
[titan.ProtocolModules.M3UA] Checking out c496d298876fed55c2b730278b7ee77982555563
[titan.ProtocolModules.PFCP_v15.1.0] Checking out d550ad9ddb6f9c823c9a555254cd76cf0e738d18
[titan.ProtocolModules.MobileL3_v13.4.0] Checking out b6602eb357673f097ea1a1d22edd568ecd239da1
[titan.TestPorts.TELNETasp] Checking out 873fe539642542cd9a901c208f1ec11c6d2f5387
[titan.TestPorts.SIPmsg] Checking out 78bf0daf8c599d374089d97a054914d8439d133a
[titan.TestPorts.UDPasp] Checking out 54176e95850654e5e8b0ffa2f1b5f35c412b949c
[titan.ProtocolModules.BSSGP_v13.0.0] Checking out e97d92a8b66bec399babea52f593771b76cb175a
[titan.ProtocolModules.BSSMAP] Checking out 4acb6ab5f058477f0b90c2da182d52054e3614b0
[osmo-uecups] Updating URL to https://gerrit.osmocom.org/osmo-uecups
[osmo-uecups] Checking out 8362efef7c6fa341eb947a75786878e0685767b7

Change-Id: I0231488b02fdb5aa19b864e51864682ebbb3b0c6
The file was modifieddeps/update.sh
The file was modifieddeps/Makefile
Commit 3ebc0972e6a613dc78e72fdd95591d9b20cd8f6a by Oliver Smith
deps/update: skip checkout if nothing to do

Let the user see what changes when running "make deps" instead of
having unrelated lines for checking out the commits that are already
checked out.

Change-Id: I572ab11afd56e34d9d0d04cd1372af749caa7d48
The file was modifieddeps/update.sh
Commit c7e40d6a82ad2a004e5c82d46c5f82a9b7a99dc4 by Vadim Yanitskiy
Makefile: avoid fetching deps if not needed

Running `make deps` for the first time fetches all the dependencies.
Running `make deps` again currently results in unnecessary git-fetch
and get-checkout operations for each dependency.

This is not as bad as cloning dependencies from scratch every time,
but still takes time and triggers unnecessary requests to the servers.
It's also creating problems when building testsuites offline.

This patch makes the build system a bit smarter in a way that it would
only try to update dependencies if the 'deps/Makefile' was changed.

Change-Id: Iae98585f0a83b17596857eba8c2f51a785198580
Related: OS#6572
The file was modifiedMakefile
Commit a63b3331bf84b6031be3df528c81b063a4e24aa0 by Vadim Yanitskiy
.gitignore: ignore '.make.*' files (like .make.deps)

Change-Id: I79dfa38bc874a48cb09a6e6fb3f06405ba869491
Related: c7e40d6a "Makefile: avoid fetching deps if not needed"
The file was modified.gitignore
Commit eb1ea5b27fef626624bdae4fb062a506805f3cd6 by Vadim Yanitskiy
.gitignore: ignore ctags

Change-Id: I90f468049189d919aa0cbc3c1da1ac6f8422bc36
Related: 600ebb235 "Makefile: add target for generating tags"
The file was modified.gitignore
Commit 58a863c2895e5fff807c583b9026b8823cfb531e by Vadim Yanitskiy
Remove dead links and generated code in bin/*

Change-Id: I60929c5d4acba4d0d8df3696fade370d7e0100f8
The file was removedbin/SCCP_Mapping.ttcnpp
The file was removedbin/SCTPasp_PT.hh
The file was removedbin/SCTPasp_PortType.ttcn
The file was removedbin/General_Types.ttcn
The file was removedbin/SCCP_Testcases.ttcn
The file was removedbin/install.script
The file was removedbin/SCTPasp_Types.ttcn
The file was removedbin/SCCP_Mapping.ttcn
The file was removedbin/M3UA_Types.ttcn
The file was removedbin/SCCP_Testcases.cfg
The file was removedbin/SCCPasp_Types.ttcn
The file was removedbin/SCTPasp_PT.cc
The file was removedbin/MTP3asp_Types.ttcn
The file was removedbin/M3UA_Emulation.ttcn
The file was removedbin/Makefile
The file was removedbin/SCCP_Emulation.ttcn
The file was removedbin/SCCP_Types.ttcn
The file was removedbin/MTP3asp_PortType.ttcn
Commit 5344866f793fd6bfc8d0f3f7c18a823893c16d71 by Vadim Yanitskiy
{bsc-nat,selftest,sysinfo}/gen_links.sh: use bash, not sh

This fixes the following error:

  ./gen_links.sh: 40: shopt: not found

which is printed when compiling the above-mentioned testsuites.

Change-Id: I994e241efb73f6f8b78803cf4ecdfb057b210a3b
The file was modifiedbsc-nat/gen_links.sh
The file was modifiedsysinfo/gen_links.sh
The file was modifiedselftest/gen_links.sh
Commit a42c49f1c8110357cf643013ded2745f5d5ece6b by Vadim Yanitskiy
gen_links.sh.inc: 'set -e' to abort on error

We should not tolerate errors in '*/gen_links.sh' files.

Change-Id: Id9367e4c45c84dcbf1c308581360be73242c0d38
The file was modifiedgen_links.sh.inc
Commit 452a888e4d109dee6559f5130c8000aa09c0fd60 by Oliver Smith
testenv: testsuite: use rsync with --archive

When running in podman, the source files from the testsuite get copied
to a temporary directory to build the testsuites out-of-tree (avoiding
conflicts with possibly incompatible binary objects that may exist from
previously building the testsuites on the host).

This also copies additional scripts for preparation / clean up that may
be used in testenv.cfg. Use the --archive flag with rsync to ensure
that the executability is the same. I could have also used
--executability, but --archive contains two other existing flags and
more flags which may help us from running into unexpected situations
such as this one.

Without this patch, there was a bug when:
* first creating a shell script but not making it executable
* running testenv with podman (where rsync runs and creates the file
  initially without executable permissions)
* making the script executable
* running testenv with podman again, rsync will not adjust the
  permissions for the copy of the file
* user wonders why there is a "sh: 1: script.sh: Permission denied"
  error

Change-Id: Ia9737bd8ba22a555615862bf5e14dbdf0dea19b4
The file was modified_testenv/testenv/testsuite.py
Commit 8e244c004f76c7e5b371ad83c8666442e628741a by Oliver Smith
testenv/README: consistency fix

Add = after the vty_* keys too, like the others.

Change-Id: Ic9828b67f5a81498d0e951dd71b80b36cdd36173
The file was modified_testenv/README.md
Commit 50ae2377c5b423b0836a76791780b19495e69477 by Oliver Smith
testenv: podman.exec_cmd: better error if stopped

Testenv may try to run a comand in podman after the container was
stopped, if there is a bug in the shutdown logic. Give a meaningful
error in that case, instead of failing later on with a cryptic error in
subprocess.run() because None was passed inside cmd (for the container
name) instead of a string.

Change-Id: I29ebe200258a9a9ffb127ec8fa1260b7e2124c38
The file was modified_testenv/testenv/podman.py
Commit dc5b2865c0a0d984a5696d73e2dcda2fc762acd9 by Oliver Smith
testenv/README: deduplicate clean= description

Change-Id: I12dc9adb508a409a6156f9682c9db5684f551b06
The file was modified_testenv/README.md
Commit 426191061deae634f5218a3938e42ba239c63a92 by Oliver Smith
testenv/README: document current working dir

Change-Id: I218507bcbec94a36976fbf57d12ffd083fd2acfb
The file was modified_testenv/README.md
Commit 3d2968521c5125ee88fd39f7f3d44a888f39406c by Oliver Smith
testenv: clean_run_scripts: skip if podman stopped

Do not attempt to run the clean_run_scripts, if podman is being used and
the container has already been shutdown.

Change-Id: I3cc05aabd97b73b65c3089e8806f7a9b32e5975c
The file was modified_testenv/README.md
The file was modified_testenv/testenv/testdir.py
Commit a247aa34831cf0a5580a8e24a0702956392bf032 by Oliver Smith
testenv: copy=: support copying directories too

In preparation for adding the inital testenv.cfgs for ggsn, allow
copying full directories with copy= too. This will make the ggsn
testenv.cfg files easier to maintain.

Change-Id: I8e680fbd93516030614c015d7c3b5bdb153ec487
The file was modified_testenv/README.md
The file was modified_testenv/testenv/testdir.py
Commit ca44f4f3558f0cd7f904bedf8c80ae16cf4a2b9a by Oliver Smith
ggsn: sync GGSN_Tests.cfg with docker-playground

Add parameters that are missing from the config.

Change-Id: I16a8cbd77f52a1ca5c52c045b8d0932e681cc380
The file was modifiedggsn_tests/GGSN_Tests.cfg
Commit fcaa06144464e0ee7315aefa179b70bcfbef0260 by Oliver Smith
ggsn: add testenv.cfgs for osmo-ggsn

Change-Id: I941b859261c1fbf27360673f14f8a79f0cf6f509
The file was removedggsn_tests/osmo-ggsn.cfg
The file was addedggsn_tests/osmo-ggsn/testenv.sh
The file was addedggsn_tests/osmo-ggsn/osmo-ggsn-v6_only.confmerge
The file was addedggsn_tests/testenv_osmo_ggsn_v4_only.cfg
The file was addedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
The file was addedggsn_tests/osmo-ggsn/osmo-ggsn-v4v6_only.confmerge
The file was addedggsn_tests/osmo-ggsn/osmo-ggsn-all.confmerge
The file was addedggsn_tests/osmo-ggsn/osmo-ggsn-v4_only.confmerge
The file was addedggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg
The file was addedggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
The file was addedggsn_tests/testenv_osmo_ggsn_all.cfg
Commit 74fc0707498ac562c17aaa04ffa317ec4f4a58b6 by Oliver Smith
ggsn: add testenv.cfg for open5gs

Change-Id: If11c0fcba84122d2398cb50208f161b9a3961df6
The file was modifiedggsn_tests/GGSN_Tests.cfg
The file was addedggsn_tests/open5gs/open5gs-smf.yaml
The file was addedggsn_tests/open5gs/open5gs-upf.yaml
The file was addedggsn_tests/open5gs/freediameter.conf
The file was addedggsn_tests/open5gs/testenv.sh
The file was addedggsn_tests/testenv_open5gs.cfg
Commit 4cb3d71bf9ce7488ce4c39537e71febd02379e16 by Oliver Smith
pcap-client: initial testenv.cfg

Change-Id: I44479dfa19390e325e42fa3416cf93260f74aea6
The file was addedpcap-client/testenv.cfg
Commit 157897523e54762ec3739cd7842c7b5f5d724ac2 by Oliver Smith
ruff.toml: new file

Add a file in the root dir of the repository to allow running
"ruff format" in order to auto-format the code with expected max line
length, PEP-8, etc.

Replace _testenv/pyproject.toml with .ruff.toml in the root directory of
the repository, so we can exclude "compare-results.py" which doesn't
follow that code style. Otherwise it would get formatted too when
running "ruff format" in the root dir of the repository.

Change-Id: I97ed1ececba85008ca754cf91bf46522e168a894
The file was removed_testenv/pyproject.toml
The file was added.ruff.toml
Commit a2ea0ac52a14d315d9769e80e979f51c68122685 by Oliver Smith
Cosmetic: testenv: fix line length

Run "ruff format", so there isn't a diff anymore when running it on
future patches.

Change-Id: I766a07c6d54d0da11ad47acce1fc07b4b3a4801b
The file was modified_testenv/testenv/podman.py
Commit 6f020365e24375e3788a4d73622d72b67fc2d9ad by Oliver Smith
testenv: improve --config argument parsing

* Support using wildcards for the config names via fnmatch as that makes
  it much easier to run the ggsn tests against all osmo-ggsn config
  variations, and update the examples in "testenv.py -h" to illustrate
  this.
* Fix that it didn't complain about an invalid --config argument, as
  long as there was a valid --config argument before it.
* Let raise_error_config_arg only output the invalid --config argument
  instead of all of them.
* Complain if "--config all" is used in combination with another
  --config argument.
* Sort testenv*.cfg files found alphabetically, so they are always
  executed in the same order.

Change-Id: I66b976b0332be523c084a6b5d38d0f62134b495d
The file was modified_testenv/testenv/testenv_cfg.py
The file was modified_testenv/testenv/testdir.py
The file was modified_testenv/testenv/__init__.py
Commit 9cc15715929078970d773b5a419fbbe928a84620 by Oliver Smith
ggsn: testenv: fix paths in copy= and clean=

I had moved osmo-ggsn related files to the osmo-ggsn directory and
forgot to adjust testenv_osmo_ggsn_{v4,v6,v4v6}_only.cfg. Fix it by
changing it like it is in testenv_osmo_ggsn_all.cfg

Change-Id: Ibc8aeb43ff594a6b26699f81b29abc31b9b5b71f
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
Commit b8c0bc745c5d86fd9d5b292e77a54e28505525f7 by Oliver Smith
ggsn: testenv: add libosmocore-utils to package=

Add libosmocore-utils, so osmo-config-merge is installed when running
with --binary-repo too. The osmo-config-merge program is used in
osmo-ggsn/testenv.sh to merge the configs.

Change-Id: I7d97e0f923d928e9b51ff41d50b28706e0e6790b
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_all.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
Commit faa6fc2d3083e1d074a3a3e6ca8714c920a6d453 by laforge
library: add generic Mutex API for parallel components

In certain scenarios, it's required to ensure that only one of multiple
parallel components executes a specific code block at any given time.

This, for example, is the case for the S1GW testsuite, where we want to
simulate multiple eNBs establishing E-RABs.  Each new E-RAB triggers the
IUT (osmo-s1gw) to send a PFCP Session Establishment Request, and there
is no way for the PFCPEM to correlate which session belongs to which eNB.
This problem can be solved by ensuring that only one eNB is triggering
the PFCP Session Establishment Request(s) at a time.

This patch implements a generic Mutex API, which can also be used
by other testsuites that orchestrate multiple parallel components.

Change-Id: Id71f43bd5fc78d4bb4417d6c01fcff8112ea6032
The file was addedlibrary/Mutex.ttcn
Commit aaa88deeb3ef7f53f9867438ee7fcad9b7df8e11 by laforge
library/PFCP_Emulation: a better PDU routing concept

In recently merged 2962d170 I wrongly assumed, that SEID of outgoing
PFCP PDUs can be used to correlate and route the incoming PDUs.  In
fact, the PFCP peers use two different SEID values, negotiating them
using the F-SEID IE.

We could have implemented a logic to look for F-SEID in the outgoing
PDUs, store and then use it for routing.  However, a more flexible
approach is to allow the the PFCP_ConnHdlr components to subscribe
and unsubscribe to/from specific SEID values explicitly.

In this spirit, let's allow the PFCP_ConnHdlr components to subscribe
and unsubscribe to/from broadcast PDUs (i.e. those, for which the
PFCPEM component could not find a single recipient) explicitly.

Implicit routing using the SeqNr remains unchanged and will be
performed by the PFCPEM component automatically like before.

Change-Id: I25802471519fa297ad4cb2b056adaa6748b00af2
Related: 2962d170 "library/PFCP_Emulation: fix routing of incoming PDUs"
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
The file was modifiedlibrary/PFCP_Emulation.ttcn
Commit 19ef9f42928774f09248f907795c6cbf8c31cf84 by laforge
library: as_pfcp_ignore(): log SeqNr of received PDUs

Printing the PFCP PDU template ('?' by default) is not very informative
when reading logs.  Printing the message type of the received PDU is
not informative either, because message types are defined as numbers
in PFCP_Types.ttcn.  Printing the whole PDU is way too verbose, and
would be redundant given that the PFCPEM component already does print
all received PDUs.  Let's print the sequence number.

Change-Id: I803ff46def4ae0182310bc01e753fe0c05112836
The file was modifiedlibrary/PFCP_Emulation.ttcn
Commit d6bfbe2de135f1ee38ec75859296b4eaad9f55ad by laforge
s1gw: f_init_pfcp(): use 'PFCPEM' as the prefix

Make it clear that it's the PFCP EMulation component.

Change-Id: Ia5413313cffb265f83ea0850e31dfb35274c28ba
The file was modifieds1gw/S1GW_Tests.ttcn
Commit 69a58d44359e08e4c29d84b22c6a2b949a4a7178 by laforge
s1gw: make number of eNBs configurable via module params

... so that we can scale the number of eNBs simulated in the
*_multi TCs without having to touch and compile code.

Change-Id: Ia80b9118e66a5d6721b89d3ba068227d30dcc01f
The file was modifieds1gw/S1GW_Tests.ttcn
Commit ff60a63c2aa656978cfdaf5958e21fadf8462ef5 by laforge
Revert "s1gw: cache PFCP Recovery Timestamp in ConnHdlr"

This reverts commit 7ad95e1cfb00d269069bd052c44a9cae9027f763.

A follow-up commit will remove the need for each ConnHdlr to call
f_ConnHdlr_register_pfcp(), that among with handling the PFCP
association retrieves a PFCP Recovery Timestamp from the PFCPEM.

Caching the PFCP Recovery Timestamp value is not really worth it,
since it's rarely used and can always be retrieved on demand.

Change-Id: I3b1c488e3ec251c7659cd9bc3197cca2f9d03144
The file was modifieds1gw/S1GW_Tests.ttcn
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
Commit 17f589464ba4063f12f3b03a9a958f492ad6d88f by laforge
s1gw: move PFCP association handling into a dedicated ConnHdlr

Previously, the PFCP association request from the IUT was handled by
the first ConnHdlr component (idx := 0).  While this approach has
worked, it fails when multiple ConnHdlr instances (idx > 0) are spawned.

The problem arises when other ConnHdlr (idx > 0) instances initiate
PFCP procedures before the first ConnHdlr (idx := 0) has established
the association, so we end up playing races.

This patch introduces a dedicated ConnHdlr component to handle the
PFCP association independently.  Once the association is established,
the actual test ConnHdlr instances are spawned, ensuring a more
reliable and orderly process.

Change-Id: I5e1a14105a35b785bf598dc2a8c436ea6fb6b0f1
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifieds1gw/S1GW_Tests.ttcn
Commit 2f6d76c9dd982fbf9c6660e875fb6d3aa3beced6 by laforge
s1gw: add multi-eNB variants of TC_e_rab_setup

The idea is to simulate multiple eNBs establishing one or more
E-RAB(s) simultaneously.  In order to achieve that, use the new
Mutex API to ensure that only one ConnHdlr component is triggering
PFCP session establishment at any given time.

The problem is that there is no way for the PFCPEM component to
correlate which PFCP session belongs to which eNB when multiple
ConnHdlr instances establish E-RAB(s) in parallel.  This can be
solved by making a part of the test scenario synchronous.

Change-Id: I9e2eb25a7ae78ff623b94802d881af4894d0cacd
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifieds1gw/S1GW_Tests.ttcn
The file was modifieds1gw/expected-results.xml
The file was modifieds1gw/gen_links.sh
Commit fb40c1f25de90fd95dc9553f5db3209967008c66 by laforge
s1gw: add f_ConnHdlrList_all_done()

Change-Id: I20c472dd8ce7f5a25c349cc079bd5bd873be2950
The file was modifieds1gw/S1GW_Tests.ttcn
Commit a2624ff32a4a342c51c62ca4e74ca8f7afa3a538 by laforge
s1gw: f_ConnHdlr_rx_erab_release_cmd(): fix wrong template

Change-Id: Ib6b9f346216aaa9587025e1c580876611e6fa7bc
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
Commit bb187e8180d52b615ec84a407e9caad0207b49fa by laforge
s1gw: add TC_e_rab_release_ind

Change-Id: Icc28a596b7646441761cc3f56653c5f7b3ddaaca
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifieds1gw/S1GW_Tests.ttcn
The file was modifieds1gw/expected-results.xml
Commit e87acf9c5fb7ec3dc79115ba3ec7ed1f735024ac by laforge
s1gw: f_ConnHdlr_erab_release_cmd(): add missing logging

Change-Id: I6e4574ebda2459f0a5f23ee51a21a883d079c54a
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
Commit 1fb6689026a791e745160f04ea7d03f39c777b27 by laforge
library/s1ap: fix wrong IE ID in E-RABReleaseListBearerRelComp

Change-Id: I22e80f418787c10ccd002e30a329c0271cdd1b8a
Fixes: e59e681c "library/s1ap: add E-RAB RELEASE templates"
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit 1f8173137b53a0069fcdd3c9c012a7633875e0b4 by laforge
library/s1ap: fix wrong field in S1AP-RABReleaseInd

Change-Id: I7a24b6401a19a6e37392083b26657bcb45b35cbe
Fixes: e59e681c "library/s1ap: add E-RAB RELEASE templates"
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit 15b2f739bcadfc52aee9b12ceed99e91da55dd57 by laforge
library/s1ap: add templates for INITIAL CONTEXT SETUP

Change-Id: I249e34ce91c874d4b6628d367672b58a77da041e
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit a9b2b0f4f977e669136a8e87ea7bbe501b07dc96 by laforge
library/s1ap: fix wrong IDs in {ts,tr}_S1AP_InitialCtxSetupResp

Change-Id: I752f202e891f7f6ff4f8f33b56de90c99c4ab456
Fixes: ce818da5b "library: Add S1AP Templates"
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit 860e924b4188f70098eeeb617b78c2b1ad26ea24 by Vadim Yanitskiy
library/s1ap: comment out optional IE in tr_S1AP_InitialCtxSetupResp

Change-Id: I4765036be69ff10adb8c510d4092834c4e923229
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit 889be0f14ffdb241f08a6e52576fd09cef802a10 by Vadim Yanitskiy
library/pfcp: fix template restriction in PFCP_Session_Est_Resp

Change-Id: Icf070443ffb7cfff84559db40459d0e9629ad024
The file was modifiedlibrary/PFCP_Templates.ttcn
Commit 8eab02345f91067909e5240f3e66192f0dd4917a by Vadim Yanitskiy
library/pfcp: make Cause IE configurable in all templates

Change-Id: I76e52d3450cca87f5fead0f834fa58ce4902ddd8
The file was modifiedlibrary/PFCP_Templates.ttcn
Commit 1fef9e09d547faa1be822e76358ca9f07ad7e381 by Vadim Yanitskiy
s1gw: TC_e_rab_setup: complete E-RAB release

The MME originated E-RAB RELEASE procedure includes both:

* [ENB <- MME] E-RAB RELEASE COMMAND, and
* [ENB -> MME] E-RAB RELEASE RESPONSE.

The later was overlooked in a99224c9, so add it.

Change-Id: I856248d825b6ecf0635590b7bf02593cfae893d3
Fixes: a99224c9 "s1gw: TC_e_rab_setup: also test E-RAB release"
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifieds1gw/S1GW_Tests.ttcn
Commit 4609bbbc67e2366807423281861a6d81cbd8c9d8 by Vadim Yanitskiy
s1gw: separate f_ConnHdlr_session_{establish,modify}()

Change-Id: I95dc3be975a8f51f7535b96d1580ef70b85fa2e0
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
Commit 89064cc591ba3bae7c3b6040f1b510b56acf42d8 by Vadim Yanitskiy
s1gw: add testcases for INITIAL CONTEXT SETUP

Change-Id: I72e3ab932fee1de0fce8ddf4041b8f2174416bc1
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifieds1gw/S1GW_Tests.ttcn
The file was modifieds1gw/expected-results.xml
Commit 7108643171a3fc71a75e4ff7434b5252c7df5b2e by Oliver Smith
testenv: podman: disable send_redirects

When starting podman, set the following sysctls to avoid ICMP redirects.
ICMP redirects lead to test failures (TC_pdp4_clients_interact in the
GGSN testsuite), and should not be sent in the test environment in
general.

  net.ipv4.conf.all.send_redirects=0
  net.ipv4.conf.default.send_redirects=0

It is really needed to set both "all" and "default", or otherwise ICMP
redirects still show up. I've seen setting both in this patch:
https://patchwork.kernel.org/project/linux-kselftest/patch/1570719055-25110-4-git-send-email-yanhaishuang@cmss.chinamobile.com/

Fixes: OS#6575
Change-Id: Ie27668f38b80c52ffef4e17b3fe64f0c9109bdea
The file was modified_testenv/testenv/podman.py
Commit 26f4e4bd0286db4262a3dc8c8d378e1a7e850272 by Vadim Yanitskiy
s1gw: add TC_initial_ctx_setup_failure

Change-Id: I969ea6813c9b805d116a974c70ab5f6e6e721e48
The file was modifieds1gw/expected-results.xml
The file was modifieds1gw/S1GW_Tests.ttcn
Commit 78be044dadea4470caca6104fd8f53fc490efbf8 by Vadim Yanitskiy
s1gw: move MME_UE_S1AP_ID to ConnHdlrPars

Change-Id: Idac24c54529073855f75bef7bcec87fc68b66e1e
The file was modifieds1gw/S1GW_ConnHdlr.ttcn
The file was modifieds1gw/S1GW_Tests.ttcn
Commit 32662ad138fdd36fb9962e59711d1e9514417793 by Oliver Smith
testenv: requirements: find programs in /usr/sbin

Fix that testenv complains about a missing setcap program, if it is in
/usr/sbin/setcap and /usr/sbin is not in PATH as it is the case with
Debian. We actually run setcap with sudo when it is needed, and in that
case /usr/sbin gets added to PATH in Debian.

Fix for:
  [testenv] Missing program: setcap

Change-Id: Ibbccba013ac38415ef46467f97bef846b848cf39
The file was modified_testenv/testenv/requirements.py
Commit 23a36504bbed820c4025220577f8dee67b7196e3 by Oliver Smith
testenv: podman: remove mongodb-org.list

Remove mongodb-org.list at the end of building the podman image, as we
only need to install mongodb once in the container but won't use the
repository afterwards. This avoids checking the mongodb repository in
"apt update".

Change-Id: I5a0455a4dbf8a31366bff65fd011fd5494b64ea7
The file was modified_testenv/data/podman/Dockerfile
Commit d2a8a91a86bdc300252aef6f78d052c14e2a47d4 by Oliver Smith
testenv: podman: don't install GUI packages

Install erlang-nox and use the pre-built rebar3 as linked from
rebar3.org, instead of using the Debian package to avoid pulling in
~600 MB of GUI dependencies.

Related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083096
Change-Id: I27f58d1f102cf85ff7ff301c52696b65150e2898
The file was modified_testenv/data/podman/Dockerfile
Commit c84c196c6bcd3dc78c5f42fb9c3e3944a6fa88c7 by Oliver Smith
ggsn: osmo-ggsn.src.cfg: tweak log output

* Print log levels.
* Don't print categories as hex.
* Print the basename at the end of the line.
* Remove "logging level lgtp debug", there already is
  "logging level lgtp info" further above, and this is a more sensible
  setting. With "debug" there are way too many log messages in e.g.
  TC_lots_of_concurrent_pdp_ctx.

Change-Id: I771d07645ea6da91f2c93f0954d99a37c866629a
The file was modifiedggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg
Commit 2d00ff393d38f569a817c50ea1d94f16a38c2e50 by Oliver Smith
ggsn: testenv: replace dummy netdev with bridge

Replace the dummy netdev that was used as network device reachable
through the GTP tunnel that can answer ICMP, with a bridge device. The
bridge device fulfils the same purpose, plus it can be used in a future
patch to connect osmo-ggsn when it is running in QEMU with the
testsuite.

Change-Id: I102d5b9ed0b3cafc263ad489ed4d4652f5e6dac8
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
The file was modified_testenv/testenv/requirements.py
The file was modifiedggsn_tests/open5gs/testenv.sh
The file was modified_testenv/data/podman/Dockerfile
The file was added_testenv/data/scripts/add_remove_testenv0_bridge.sh
Commit b05196bd87251d29d0369d30a3688a49309cbb43 by Oliver Smith
testenv: osmo-dev: build with gtp_linux.opts

Run the osmo-ggsn ./configure with --enable-gtp-linux, in preparation
for testing kernel gtp-u with testenv too.

Related: https://gitea.osmocom.org/osmocom/osmo-dev/src/branch/master/gtp_linux.opts
Change-Id: Ia8ea5494597e0fedae93f501c8bc7d6115543f36
The file was modified_testenv/testenv/osmo_dev.py
Commit 5ac9dc135751a053684a0d572a73879f4b41dd97 by Oliver Smith
testenv: bridge: change default IPs 201 -> 1

During code review it was decided that we want to keep the 127.0.0.1
(and other 127.0.0.x) IPs in the configs, so one can start the testsuite
with osmo-ggsn directly on the host without using testenv scripts too,
with the same config.

The testenv script for osmo-ggsn will replace 127.0.0.x with 172.18.3.x
on the fly before the testsuite starts, so we can run osmo-ggsn
optionally in QEMU on 172.18.3.2, which will be bridged to the host.

172.18.3.1 will be used by the GGSN testsuite now, instead of
172.18.3.201 as previously planned, so change the default IP of the
bridge. The bridge is not used for another testsuite yet.

Add the 201 IPs as EXTRA_IPS for the non-QEMU case, as they are
configured as DNS IPs and tests need to be able to reach them.

Change-Id: Ied055e6e4d6214fd5247694e697a35a1e8ff1966
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
The file was modifiedggsn_tests/open5gs/testenv.sh
The file was modified_testenv/data/scripts/add_remove_testenv0_bridge.sh
Commit d82c9efed9bc44302d0bf428a0234727c961037e by Oliver Smith
ggsn: testenv: run SUT on bridge instead of lo

Replace IPs in testenv.sh so the SUT runs on 172.18.3.2 (testenv0
bridge) instead of 127.0.0.2 (lo). Later on when we can optionally use
QEMU with osmo-ggsn to test kernel GTP-U. It will then run on this IP as
well. So with this change we can use the same IP for both the QEMU and
non-QEMU case.

Change-Id: Ib768603b0050fe62baff39cab982a850eb91f49a
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
Commit fffa8ec1f928afe200e94e5a5c4561c2251bf38f by Oliver Smith
ggsn: testenv: change VTY IP

Access the VTY of osmo-ggsn via 172.18.3.2 (127.0.0.2 if running without
testenv), so the testsuite can access the VTY when osmo-ggsn optionally
runs in QEMU too (through the bridge).

Change-Id: I054c19041b3027e7f66d925f031002fefe011c58
The file was modifiedggsn_tests/testenv_osmo_ggsn_all.cfg
The file was modifiedggsn_tests/GGSN_Tests.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4_only.cfg
The file was modifiedggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
Commit caaa0d631b8a8a4f8ed426455c36ca7e94c62ba0 by Oliver Smith
testenv: support running SUT in QEMU

Add two new arguments -C|--custom-kernel and -D|--debian-kernel. If any
of these is set, pass an environment variable TESTENV_QEMU_KERNEL with
the path to the kernel when running commands from testenv.cfg.

These commands can then source the new qemu_functions.sh and use it to
build an initramfs with the SUT and depending libraries on the fly, and
start up QEMU to boot right to starting the SUT. All of that takes about
~1s on my system with kvm. Without kvm ~5s.

A follow-up patch will adjust the ggsn testenv configs to optionally run
osmo-ggsn in QEMU for testing kernel GTP-U.

These scripts are based on scripts/kernel-tests from docker-playground.

Related: osmo-ci Id64a1a778fa38eec20498c36b390332f75d7d3f5
Change-Id: Ic9cb7092fd029b7ba530fc755b5d4d73a9d86350
The file was modified.gitignore
The file was modified_testenv/README.md
The file was modified_testenv/data/podman/Dockerfile
The file was added_testenv/data/scripts/qemu/qemu_ifup.sh
The file was added_testenv/data/scripts/qemu/qemu_wait.sh
The file was modified_testenv/testenv/podman.py
The file was modified_testenv/testenv/testenv_cfg.py
The file was modified_testenv/testenv/__init__.py
The file was modified_testenv/testenv/requirements.py
The file was added_testenv/data/scripts/qemu/qemu_functions.sh
The file was added_testenv/data/scripts/qemu/qemu_init.sh
The file was modified_testenv/testenv/cmd.py
Commit 69aa39abf63ffd19aecb3502dec7251c0e77350d by Oliver Smith
ggsn: testenv: support running osmo-ggsn in QEMU

Run osmo-ggsn optionally in QEMU, to test the kernel GTP-U feature
with different kernels.

Related: OS#3208
Change-Id: I3f9db4325d5928c809cc99bc82d9cb82bf9e71eb
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
The file was modifiedggsn_tests/testenv_osmo_ggsn_all.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
The file was addedggsn_tests/osmo-ggsn/run.sh
The file was modifiedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4_only.cfg
Commit ed4ccbf3ee288c599a357a5d89ef39bae4256b0d by Oliver Smith
Cosmetic: ggsn: fix copy paste error

Change-Id: Iad2424036ff3dd45a9cd67f28249fbb06e657e62
The file was modifiedggsn_tests/GGSN_Tests.ttcn
Commit 793ee0df8149d257e4da80405290f53a008cacdf by lynxis
L3_Templates: GMM: fix off-by-one error in ServiceType IE

The ServiceType IE is used in the GMM Service Request.

Change-Id: I79337fa31ffa82f766c6a1f238739c5e10773823
The file was modifiedlibrary/L3_Templates.ttcn
Commit 28b47ddc24924508d554710e03eff05021408f0d by Pau Espin Pedrol
update osmo-stp.cfg to make STP_Tests work at all again

This syncs osmo-stp.cfg with changes introduced to docker-playground
in Change-Id I210b7d62845075dcfe147f2f77603625cc1e64f9 on March 4th.

I'm really getting tired at fixing up those kind of issues. It's
well-known that config changes must be made first here and then in
docker-playground.

Change-Id: I7f0cef55a9a54f1cc4b23df781dab2afd52aae78
The file was removedstp/osmo-stp-tcp.confmerge
The file was modifiedstp/osmo-stp.cfg
Commit 744d42f5745514ff56a7ff91d468e1e984041706 by Pau Espin Pedrol
Replace libosmo-sccp references with libosmo-sigtran

Change-Id: I8556a9eb4e111340e2415c5adf0ad91927ce53ec
The file was modifiedsgsn/testenv_generic.cfg
The file was modified_testenv/testenv/podman_install.py
The file was modifiedsccp/SCCP_Tests.ttcn
The file was modifiedsccp/SCCP_Tests_RAW.ttcn
The file was modifiedsgsn/testenv_sns.cfg
The file was modifiedsmlc/testenv.cfg
Commit 6f37f2f6a6c10b80f24b88ee631443b5ba3bd6ee by Pau Espin Pedrol
_testenv: Avoid running make check when building IUT

In here we want to build stuff to run ttcn3 tests, not unit tests.

Change-Id: I1b5dd0947a1bd937775a74bceb88dcf3bbcf914b
The file was modified_testenv/testenv/osmo_dev.py
Commit e85c0c3069f03068d7187bf971a3e4139f5c4bd0 by Pau Espin Pedrol
stp: Support running with testenv

The osmo-stp.cfg was not up to date with the one further updated in
docker-playground.git.

Change-Id: I43fefc206fbc7f3a4fba9e4d4ba4386e5ca748f7
The file was addedstp/testenv.cfg
The file was modifiedstp/osmo-stp.cfg
Commit e72c295fdd725246b50d8c90f9199483d68f349b by Oliver Smith
library/GTPv1U_Templates: support sending ext hdrs

Replace the seq (sequenceNumber) parameter in ts_GTP1U_PDU with
opt_part (GTPU_Header_optional_part). opt_part contains seq:

  type record GTPU_Header_optional_part {
    OCT2                       sequenceNumber,
    OCT1                       npduNumber,
    OCT1                       nextExtHeader,
    GTPU_ExtensionHeader_List  gTPU_extensionHeader_List optional
  }

With this change it is possible to set the extension headers too when
sending GTPU packets. This is in preparation for a GGSN test case with
extension headers.

Related: OS#6223
Change-Id: I5b1668d45f4454f92c234054678e17145bd4fe49
The file was modifiedepdg/EPDG_Tests.ttcn
The file was modifiedhnodeb/HNBGW_ConnectionHandler.ttcn
The file was modifiedsgsn/BSSGP_ConnHdlr.ttcn
The file was modifiedggsn_tests/GGSN_Tests.ttcn
The file was modifiedlibrary/GTPv1U_Templates.ttcn
Commit 6fe837de206c2c927ce44a8d53e1fb377b475937 by Oliver Smith
testenv: podman: restart_count in container_name

When running testsuites with multiple configurations in a row, as it is
the case with the ttcn3-ggsn jobs in jenkins, the podman container gets
restarted whenever switching to the next config.

Use a different name for each container by appending a restart count.
This should fix that podman sometimes didn't fully shutdown the
container yet and complains that the container name is already in use.
This happens even though we use "podman kill" and "podman wait" on the
previous container. When checking later, the container is really gone
and the same name can be used, it seems that it just needs some more
time to shutdown in some cases.

Fix for:
> Error: error creating container storage: the container name
> "testenv-ggsn_tests-osmo_ggsn_-osmocom-nightly-20241012-0752-2eb85125" is
> already in use by "8b7ea42371a922ffbf4e966b853124b98cd25c9905ae443fefb4115a103d7779".
> You have to remove that container to be able to reuse that name.: that name is already in use

Related: https://github.com/containers/podman/issues/2553
Related: https://jenkins.osmocom.org/jenkins/job/ttcn3-ggsn-test/2674/console
Change-Id: Ia791be2fee69765293ce7a7a058319c92bb92714
The file was modified_testenv/testenv/podman.py
Commit a9c2ec6965909b7c2f443c1ecd6a582c5cca8cf2 by Pau Espin Pedrol
sgsn: Validate TLI received in RAB Ass Req

Related: OS#6508
Change-Id: I3a3699cea981caa89b30742c031d5f232418b0ee
The file was modifiedlibrary/ranap/RANAP_Templates.ttcn
The file was modifiedsgsn/gen_links.sh
The file was modifiedsgsn/BSSGP_ConnHdlr.ttcn
The file was addedlibrary/ITU_X213_Types.ttcn
Commit 1fb571d4fe7765d2e429a7125c9c2fa7990086d7 by Pau Espin Pedrol
sgsn: Test tx Rab Ass Resp with ITU X.213 IPv4 address format

Related: OS#6508
Related: SYS#7119
Change-Id: I38dd85f617600a974cbe8fd17597282eaf950a78
The file was modifiedsgsn/SGSN_Tests_Iu.ttcn
The file was modifiedsgsn/BSSGP_ConnHdlr.ttcn
The file was modifiedsgsn/SGSN_Tests.ttcn
The file was modifiedsgsn/expected-results.xml
Commit 7bdbd1d5264abf496795e0c2a74e96f07efd3e5f by Pau Espin Pedrol
sgsn: Introduce test TC_attach_pdp_act_user_addr_itu_x213_ipv4toolarge

Related: OS#6508
Related: SYS#7119
Change-Id: Id2501e38565db491a6248552e754f03f7b973997
The file was modifiedsgsn/SGSN_Tests_Iu.ttcn
The file was modifiedsgsn/BSSGP_ConnHdlr.ttcn
The file was modifiedsgsn/expected-results.xml
Commit e62b03c45dfbb94b8ba8cccf775979e7ef1e00fe by Pau Espin Pedrol
sgsn: Improve validation of TLA encoded in RAB Ass Req

Validate received TLA in RAB Ass Req according to confguration and test
expectancies.

Related: OS#6508
Related: SYS#7119
Change-Id: I725bf39c5564fb320954fc9e387ac569fc1a0136
The file was modifiedsgsn/SGSN_Tests_Iu.ttcn
The file was modifiedsgsn/BSSGP_ConnHdlr.ttcn
Commit f7ad820eb83bd92df4fb831ce438fe7287f1555c by Pau Espin Pedrol
cosmetic: sgsn: Fix indenation whitespace

Use tabs as done in all the file.

Change-Id: I8cb9283fee9d5a4ff5c34b9cde4d8fcce400343a
The file was modifiedsgsn/BSSGP_ConnHdlr.ttcn
Commit 6734ee53b419cfe30e85bceb7e30cf8bb853de41 by Oliver Smith
ggsn: README: document how to run with testenv

It is possible to run the GGSN testsuite in a lot of ways (as it was
ported from docker-playground, which had the same variations but with a
less consistent way of running them).

Document how it is typically run for development / in jenkins. This
should make it easier for users, in addition to testenv already telling
which configs are available if trying to run the ggsn testsuite without
the -c argument, and to the general help output in "./testenv.py run -h".

$ ./testenv.py run ggsn
[testenv] Using testsuite ggsn_tests (via alias ggsn)
[testenv] Found multiple testenv.cfg files:
[testenv]  * testenv_open5gs.cfg
[testenv]  * testenv_osmo_ggsn_all.cfg
[testenv]  * testenv_osmo_ggsn_v4_only.cfg
[testenv]  * testenv_osmo_ggsn_v4v6_only.cfg
[testenv]  * testenv_osmo_ggsn_v6_only.cfg
[testenv] Select a specific config (e.g. '-c open5gs') or all ('-c all')

Change-Id: I49421151b199fa6536da784b6c412b03f3fdbd05
The file was modifiedggsn_tests/README.md
Commit 6bba94c76d17cf541f70ea5c975b6402b0820978 by Pau Espin Pedrol
library/GTPv1C_Templates: Lots of improvements in template declarations

Also most the compiler warnings are fixed, only some which require
special more complex attention are left as is.

Change-Id: I38a4b1c5874fda173a7b89122c84cb83ac71a036
The file was modifiedmme/MME_Tests.ttcn
The file was modifiedsgsn/SGSN_Tests.ttcn
The file was modifiedlibrary/GTPv1C_Templates.ttcn
Commit 2c10e94d32d53a476fe13a70c6e6ac10e80987c0 by Pau Espin Pedrol
cosmetic: library/GTPv1C_Templates: remove extra indentation level

The extra first indentation level around 99% of the file just loses
space which makes it difficult to keep templates at an acceptable width.
Do similarly to what we already do in lots of other template files which
were added later than this one.

Change-Id: I87755ec0a9023e79fb5f7a40c6c1734dca44696b
The file was modifiedlibrary/GTPv1C_Templates.ttcn
Commit 4d0d30a59b5d02995d4ac6be2dddf3d18e6422aa by Pau Espin Pedrol
library/GTPv1C_Templates: Clean up PCO templates

* Define a generic ProtoElem template and use it everywhere.
* User superset instead of "*, tr_..., *" construct.

Change-Id: I005a6dea0606bcb677260f85b24396b55a150153
The file was modifiedlibrary/GTPv1C_Templates.ttcn
Commit 2f102a80f19ca72cc42a7066d7e9bd0a1de597ac by Pau Espin Pedrol
mgw: Remove unneeded dep IPCP_Types.ttcn

Change-Id: I318f4ba78adf778820e8d65d5932e454bc5da670
The file was modifiedmgw/gen_links.sh
The file was modifiedmgw/MGCP_Test.ttcn
Commit 436fc24ff1c55b4cec4d5b001c5980e9b6d9bc32 by Pau Espin Pedrol
s1gw: Remove unneeded dep IPCP_Types.ttcn

Change-Id: Iad81c8d76efa2618ca7e354d2b73617a54a8d5ee
The file was modifieds1gw/gen_links.sh
Commit cca9a92cd01610a390a33fb97e1286193a9963b8 by Pau Espin Pedrol
library: Move IPCP templates GTPv1C_Templates.ttcn -> IPCP_Templates.ttcn

We already have an IPCP_Types.ttcn, and the GTPv1C_Types from
ProtocolModules dep we use doesn't actually specify any record for IPCP,
so those are totally protocol independent.

Change-Id: I233292ea886e1b69a2f9aa1a159c816791b47136
The file was addedlibrary/IPCP_Templates.ttcn
The file was modifiedggsn_tests/GGSN_Tests.ttcn
The file was modifiedggsn_tests/gen_links.sh
The file was modifiedpgw/gen_links.sh
The file was modifiedgbproxy/gen_links.sh
The file was modifiedlibrary/GTPv1C_Templates.ttcn
The file was modifiedmme/gen_links.sh
The file was modifiedhnodeb/gen_links.sh
The file was modifiedsgsn/gen_links.sh
Commit 45c9f8f5c9285c275e882a143b11c022e0d948cf by Pau Espin Pedrol
library/PCO_Types: Drop unused nonsense enum

That enum is PAP related, plus it doesn't really match the section
describing, plus it's not used anywhere.
Looks like a development artifact which was not dropped during submit.

Change-Id: Ic791d20dd600b039daa2abef7fa25aaa6780a448
The file was modifiedlibrary/PCO_Types.ttcn
Commit 3f2ed83e7307746b881e3c0a7ac4e2cf727fe735 by Pau Espin Pedrol
library/PCO_Types.ttcn: Drop unsued IPCP_OPT enum

It is unused, plus IPCP_Types.ttcn already defines a more complete enum
in IpcpConfigOptCode.

Change-Id: I867ab36063db262b46fc4546c17a902699a6e37c
The file was modifiedlibrary/IPCP_Types.ttcn
The file was modifiedlibrary/PCO_Types.ttcn
Commit 54eb13f86a1db021eb018e6326766717f7142a48 by Pau Espin Pedrol
ggsn: Introduce test TC_pdp4(6)_act_deact_mtu

This tests so far only test retrieval of MTU over PCO, which is only
used for IPv4 APNs.
When IPv6 is in used, it is expected to be retrieved over IPv6 SLAAC RA.
Such tests will be done in a follow-up patch once the related procedure
is implemented in osmo-ggsn.

Related: OS#6298
Related: SYS#7122
Change-Id: I2ceb76a3a07b44f69937c9f5a040482320bca377
The file was modifiedlibrary/GTPv1C_Templates.ttcn
The file was modifiedggsn_tests/expected-results.xml
The file was modifiedggsn_tests/gen_links.sh
The file was modifiedlibrary/PCO_Types.ttcn
The file was modifiedggsn_tests/GGSN_Tests.ttcn
Commit 4c0cd581453b17e7eb7e3267583194417efb1147 by Pau Espin Pedrol
ggsn: Validate MTU sent during ICMPv6 RA

Related: OS#6298
Related: SYS#7122
Change-Id: Ia5bbc5f9e42b02d1b9bd6c4190a2bd439663deeb
The file was modifiedggsn_tests/GGSN_Tests.ttcn
The file was modifiedlibrary/ICMPv6_Templates.ttcn
The file was modifiedggsn_tests/expected-results.xml
Commit 2329259de3634324cb108e447cc001a2f045611f by Pau Espin Pedrol
ggsn: Request osmo-ggsn to apply the MTU on the tundev

Depends: osmo-ggsn.git Change-Id Ifae556169d895860812c9ea5633292d7e3fab338
Related: OS#6298
Related: SYS#7122
Change-Id: Ie55c8b41f5a4a128f999474c3fad1926099b3624
The file was modifiedggsn_tests/GGSN_Tests.ttcn
Commit 2cafd10ade08b377dc939fff383b124794726a86 by Oliver Smith
ctrl: tweak errmsg for counter mismatch

- instead of "-1", print "not present", so humans know what is
  happening.
- the comma separated args in setverdict() create a lot of weird quotes.
  Use string concatenation to have only one set of quotes around the
  entire error message.

Related: OS#6545
Tweaked-by: Oliver Smith <osmith@sysmocom.de>
Change-Id: I672fcef819a6542a5b3bcfa0a6d9c84d34b468f3
The file was modifiedlibrary/Osmocom_CTRL_Functions.ttcn
Commit 5cf0b7fb0c141de9b7192777928593e2651984c4 by Oliver Smith
testenv: qemu: get coredump and show backtrace

If the SUT crashes inside QEMU, copy the coredump via 9p to the outer
system (either host or podman) where we have the same binaries and also
debug symbols, and run gdb there to show the backtrace.

Related: OS#6600
Change-Id: Ia08ac58c43388b5ea4d3712c5ef83f54b538b10a
The file was modified_testenv/data/scripts/qemu/qemu_functions.sh
The file was modified_testenv/data/scripts/qemu/qemu_init.sh
Commit 345509c592401b58fb8d1c1bac3fe7e55afe8a16 by Oliver Smith
pcu: add testenv.cfg

Change-Id: I57956a0bb5d5e164c3f840815573164e52300459
The file was addedpcu/testenv_generic.cfg
The file was addedpcu/testenv_sns.cfg
Commit a092e8488c81afc9d18028605c569c1d304e73f9 by Oliver Smith
bsc/osmo-bsc-sccplite.cfg: add trx1, trx2

Synchronize with the config in docker-playground.

Change-Id: Ia959c725b9efee5ccf6a67e22e740a60b4fd28b9
The file was modifiedbsc/osmo-bsc-sccplite.cfg
Commit 522aa727683dc6a748637ed29c27d25806a490db by Oliver Smith
bsc/osmo-bsc{,-vamos}.cfg: add no missing-msc-text

Copy this option from the config in docker-playground to have less
cluttered output.

Change-Id: I0735e5bce207961ab960294c9f39404ab64a3fb1
The file was modifiedbsc/osmo-bsc.cfg
The file was modifiedbsc/osmo-bsc-vamos.cfg
Commit 923e442a823fd85a1766d18ffac376cbf72d53f7 by Oliver Smith
bsc/osmo-stp.cfg: sync with docker-playground

Change-Id: I32fc1374d92405d642027e0c61fdd6a297cd7807
The file was modifiedbsc/osmo-stp.cfg
Commit e7a32d954e4002c85e0f9f87d106232dcfb9e115 by Oliver Smith
bsc: add testenv.cfg

Change-Id: Ib2e92a9ebd78f5553161bcca433f39c7c39f3adf
The file was addedbsc/osmo_bts_omldummy.sh
The file was addedbsc/testenv_generic.cfg
The file was addedbsc/testenv_sccplite.cfg
The file was addedbsc/testenv_vamos.cfg
Commit c9242ab93319ed1df95250d31328ee2635a72100 by Oliver Smith
testenv: improve output for missing -c argument

When a testsuite has multiple testenv.cfg files, the user needs to
explicitly choose a config, or "-c all" for all configs. Improve the
help output to directly print the arguments that need to be passed,
instead of printing the config file names. Mention that wildcards can be
used too.

Old:
  [testenv] Found multiple testenv.cfg files:
  [testenv]  * testenv_generic.cfg
  [testenv]  * testenv_sccplite.cfg
  [testenv]  * testenv_vamos.cfg
  [testenv] Select a specific config (e.g. '-c generic') or all ('-c all')

New:
  [testenv] Found multiple testenv.cfg files, use one of:
  [testenv]  -c generic
  [testenv]  -c sccplite
  [testenv]  -c vamos
  [testenv] You can also select all of them (-c all) or use the * character as wildcard.

Related: OS#6494
Change-Id: I3f273caff702b33d3d74a9e5c8d77b22f27d7cfc
The file was modified_testenv/testenv/testenv_cfg.py
Commit 14d4a2805d6790aa410f6c5c1d7328c71bdaef84 by Oliver Smith
testenv: osmo-dev: add hint for gen_makefile fail

When gen_makefile.py from osmo-dev fails, it is likely that the osmo-dev
git clone is outdated, for example if a new file with configure options
was added to osmo-dev.git and is now being used by testenv. Display a
hint for pulling this repository to the user.

Change-Id: Ia9ed23fa910876252093054f5f389865632c7593
The file was modified_testenv/testenv/osmo_dev.py
The file was modified_testenv/testenv/podman.py
Commit c1c05554fddeb3502492b49f361a2dd4a67f3e04 by Oliver Smith
hnbgw: Support testenv

Change-Id: Id2bcc4e13881db01b8e4d9f1738355b8d779fa63
The file was modifiedhnbgw/osmo-hnbgw-with-pfcp.cfg
The file was modified_testenv/testenv/osmo_dev.py
The file was modifiedhnbgw/osmo-hnbgw.cfg
The file was addedhnbgw/testenv_generic.cfg
The file was addedhnbgw/testenv_with-pfcp.cfg
The file was addedhnbgw/HNBGW_Tests-with-pfcp.cfg
Commit c009d49e97b9302ccb411567fb23a9f3e760e40c by Oliver Smith
testenv: remove dead code for [testsuite] prepare=

Remove some WIP code that I intended to use for enabling the mongodb
repository before installing binary packages, to be able to dynamically
install mongodb from there. I solved it differently by just always
having mongodb in the podman image.

This was a dead code path because configs with prepare= in [testsuite]
are currently not valid, and therefore testenv refuses to use these
configs (see keys_valid_testsuite in testenv_cfg.py's verify()).

I have a different use case for running prepare= before running the
testsuite, to replace a module parameter in the testsuite's config. This
will be done in the next patch.

Change-Id: I9bed48612fad690f86017c298372dc6cea22b94b
The file was modified_testenv/testenv/testsuite.py
The file was modified_testenv/testenv.py
Commit c568521460426c78a7cc7f68de38af6dfe2c4921 by Oliver Smith
testenv: add proper [testsuite] prepare= support

Support using prepare= in the [testsuite] section to e.g. change module
parameters:

  [testsuite]
  prepare=sed -i 's/mp_my_parameter := false/mp_my_parameter := true/' Testsuite.cfg

Move the execution time of prepare and clean scripts in
testdir.prepare() after the testsuite config has been copied to the
testdir, so it can be modified by the prepare script.

Change-Id: Ia78a4eba061e5e070f156f75eae1dfa4cede1ee3
The file was modified_testenv/testenv/testenv_cfg.py
The file was modified_testenv/testenv/testdir.py
The file was modified_testenv/README.md
Commit 4fe47f78a000f7b7048f0c5b7883db881015bdbf by Pau Espin Pedrol
hnbgw: Split ConnHdlr component code to its own file

Similar to what we do in most of the testsuites, split Component generic
code from test specific code.

Change-Id: I3a58c27a7472eea2421a45c31ac0145eb57a1f7e
The file was modifiedhnbgw/HNBGW_Tests.ttcn
The file was addedhnbgw/ConnHdlr.ttcn
Commit 6ac0838dd48308f165343f32f3e9ae47848d121e by Pau Espin Pedrol
RAN_Emulation: Introduce field ranap_connect_ind_auto_res

This field allows skipping automatic response of the connect_ind, hence
allowing ConnHdlr to totally skip it, delay it, or generate a CREF by
means of sending RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ to RAN_Emulation,
as per ITU Q.711 Figure 8.

Change-Id: I5a69990e3a0839dd3c25c7dc66e6bcf66123fbff
The file was modifiedmsc/BSC_ConnectionHandler.ttcn
The file was modifiedsgsn/SGSN_Tests.ttcn
The file was modifiedlibrary/RAN_Emulation.ttcnpp
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit a1b2a9922fd457d59706fbe3ea70d272c4d13958 by Pau Espin Pedrol
hnbgw: Allow modifying RanOps during test startup

This will be used by a test to skip response to CONNECT.ind, allowing
transmission of DISCONNECT.req and hence transmitting CREF over the
wire.

Change-Id: Ib9462ba41b16375348b086d7ffe9f5755ae26f84
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit 6b21f7b3794e29b722ba62e8c1b69e065e9229cd by Pau Espin Pedrol
Convert RAN_Conn_Prim from enum to union

This will allow passing parameters in each primitive.
This is needed eg. to pass the reason in DISCONNECT.req.

Change-Id: I17994795b51efc7e6700238ddcf45594af653e42
The file was modifiedlibrary/RAN_Emulation.ttcnpp
The file was modifiedbsc-nat/MSC_ConnectionHandler.ttcn
The file was modifiedbsc/BSC_Tests.ttcn
The file was modifiedbsc-nat/BSC_MS_ConnectionHandler.ttcn
The file was modifiedsgsn/SGSN_Tests_Iu.ttcn
The file was modifiedsgsn/BSSGP_ConnHdlr.ttcn
The file was modifiedbsc/BSC_Tests_ASCI.ttcn
The file was modifiedmsc/BSC_ConnectionHandler.ttcn
The file was modifiedbsc/BSC_Tests_LCLS.ttcn
The file was modifiedmsc/MSC_Tests.ttcn
The file was modifiedmsc/MSC_Tests_Iu.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
The file was modifiedhnbgw/ConnHdlr.ttcn
Commit b9ded6e8ac7bbd34128e68c457cb986d8cc2d853 by Pau Espin Pedrol
RAN_Emulation: Allow setting reason in primitive MSC_CONN_PRIM_DISC_REQ

This allows setting a specific reason in the CREF transmitted on the
wire, other than "End user originted (0)".
A follow-up commit will add a test in HNBGW_Tests where an emulated MSC
answers with CREF reason "End user failure (0x02)".

Change-Id: I1fa1148135625d840426b52450bf52da10448471
The file was modifiedlibrary/RAN_Emulation.ttcnpp
Commit 4672af0114f0d611958a982ca277b8a52974ed73 by Pau Espin Pedrol
hnbgw: Fix TC_ranap_ps_mo_disconnect testing CS instead of PS

Change-Id: I16a446a9de0a40f37a4af0bf54bcf0bd49b2d47f
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit c416a68ec5188278371d0a8bd3490b6644c15132 by Pau Espin Pedrol
hnbgw: Drop unused template

Change-Id: I7dfce4485a6eaeabcdf1755619509b4b0f2bff65
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit c6707608b05e070ffdc58889a2aafa9e359e1a2d by Pau Espin Pedrol
hnbgw: Introduce test TC_ranap_{cs,ps}_creq_cref

Related: SYS#6602
Change-Id: I0313ea741feca90492e25f0adc1c04844a860e41
The file was modifiedlibrary/SCCP_Templates.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
The file was modifiedhnbgw/expected-results.xml
Commit a124a23b12aed7bba9b1888e934a7f31456888d6 by Pau Espin Pedrol
hnbgw: Set sccp_addr parameters during init

Those will be needed by other tests using UNITDATA primitives to send
RANAP ResetResourceAck.

Change-Id: I53f7e2e0a4622bb25667053b0b80e743e5f493bd
The file was modifiedhnbgw/ConnHdlr.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit 38a063aa8d955f5b729a3e2dcddb78ea43c50c30 by Pau Espin Pedrol
hbngw: Store IuSigConid in ConnHdlr params

A follow-up patch will want to use the value to register it in order to
get RANAP ResetResource messages.

Change-Id: I7eb5716debcad8427c15341612d37152ca894e5a
The file was modifiedhnbgw/ConnHdlr.ttcn
Commit 6e16d2d20e395e346f7b8131b0710af585ba57eb by Pau Espin Pedrol
RANAP_Templates: Add templates for ResetResource(Ack)

Change-Id: If6357c19b39ef63057a2d8d471975185f0161b22
The file was modifiedlibrary/ranap/RANAP_Templates.ttcn
Commit 86e5371c9e5d33bbae6bc4167fc135a8d6dc27ec by Pau Espin Pedrol
RAN_Emulation: Support registering IuSigConId for connectionless RANAP messages

This allows dispatching received RANAP connectionless (UNITDATA)
messages which target potentially existing connections identified by
IuSigConId, like RANAP Reset Resource (Ack) messages.
Dispatching it to relevant ConnHdlrs allows explicitly waiting to
receive the message and answer from there.

Change-Id: I6a00a425ce52cb0c71b03b545207f27befa11a71
The file was modifiedlibrary/RAN_Emulation.ttcnpp
Commit 869b697a399ea5e6560af784adc92efd0af11049 by Vadim Yanitskiy
s1gw: use the new counter name (out_pkt.forward.unmodified)

Change-Id: I037fea187bb78ba0d4b82d30915c5270d4cd28bb
Related: osmo-s1gw.git I952e198238384dca4be94f91a01d7cfff0a1471f
The file was modifieds1gw/S1GW_Tests.ttcn
Commit 9c3d5b9beb5033c0491469093df1e865689e6e46 by Pau Espin Pedrol
RUA_Emulation: Support passing no RANAP PDU in RUA_Disc_Req

Change-Id: Id9c3d5a1e45aa6ca58a71b61e142dc041a335cc9
The file was modifiedhnbgw/ConnHdlr.ttcn
The file was modifiedlibrary/rua/RUA_Emulation.ttcn
The file was modifiedlibrary/rua/RUA_Templates.ttcn
Commit 17329a909a62e3c055780b0ac6470bbf560a5b89 by Pau Espin Pedrol
hnbgw: Add missing timer stop after use

Change-Id: I2c722f524de603b75f2b7c6ba85d074518d1f51c
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit 0135d187401d3a40dd81706b922de8823d9bab14 by Pau Espin Pedrol
hnbgw: Get rid of pars param in void_fn

Store pars into component field "g_pars" before caling void_fn.
This simplifies ConnHdlr test functions and also avoids potential
problems modifying pars vs g_pars.
This is the same as we do in lots of other testsuites.

Change-Id: I674b2a6a6a0e39f2904f9125783180da8ade5f44
The file was modifiedhnbgw/ConnHdlr.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit 00f332eca58e81ae366deaf21e6ce8d2cfc79d97 by Oliver Smith
testenv: run podman command with logfile

In very rare cases it seems podman is just crashing with no reason in
jenkins. Add logging to the main script we run inside podman, and run
podman with a logfile attached to figure out why.

Related: OS#6607
Change-Id: Ife3c0ae559c94f7df8b5912bb0e338ae6283cb7f
The file was modified_testenv/testenv/podman.py
The file was modified_testenv/data/scripts/testenv-podman-main.sh
Commit 2978fad2273fc8f0db4b2eba315f52bbba5db777 by Vadim Yanitskiy
library/s1ap: fix wrong IE criticality in templates

Related sections in 3GPP TS 36.413:

* 9.1.3.2 E-RAB SETUP RESPONSE
* 9.1.3.6 E-RAB RELEASE RESPONSE

Change-Id: I3fd9efc4c504037758b3d97e920776123f2141e9
Related: SYS#6772
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit ce2c44c1e2e941caa7a69ebbb660ef9e904fcf66 by Vadim Yanitskiy
library/s1ap: rework {ts,tr}_S1AP_RABSetupRsp templates

3GPP TS 36.413, section 9.1.3.2 "E-RAB SETUP RESPONSE" defines
the following two IEs as optional:

* E-RAB Setup List IE: 0..1 in the Range column means that
  it can either be omitted (0) or included only once (1);
* E-RAB Failed to Setup List: 'O' in the Presence column.

Our templates for this S1AP PDU require the former to be a value
(as if it was mandatory) and do not allow passing the later.

Change-Id: Ic369ae720179483a19383af2bddf56186965eae3
Related: SYS#6772
The file was modifiedlibrary/s1ap/S1AP_Templates.ttcn
Commit 47544443bde2e01750bc03e9622ec8f61f91881e by Vadim Yanitskiy
s1gw: add TC_e_rab_setup_failure

Change-Id: I97102292678e732265dcae04d60f7a708a5246dc
Related: osmo-s1gw.git I242e84fb09b00f4794b6e1aa770f348a0e60aea4
Related: SYS#6772
The file was modifieds1gw/expected-results.xml
The file was modifieds1gw/S1GW_Tests.ttcn
Commit 25fc127c9fd1dafea51db1f8d617ef6cf0db870d by Oliver Smith
hnbgw: test for RUA Disconnect when there is no CN

Related: OS#6283
Related: osmo-hnbgw Iafb30c31a4c5db53ecdda99a0e0b5937b71e362c
Tweaked-by: Oliver Smith <osmith@sysmocom.de>
Change-Id: I2b5c024a395e736538c0c37db40d34f3b8d99991
The file was modifiedhnbgw/ConnHdlr.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit aeb0a0c236854129fe8b71f4d8e492251a36d234 by Pau Espin Pedrol
hnbgw: Send meaningful RANAP messages in f_tc_ranap_mo_disconnect()

Fix the code to send the messages that were fore sure intended, where an
MO disconnect is triggered.
This allows attaching more to reality, plus making it easier to follow
up the test in wireshark and in the code.

Change-Id: I9a2bb35d58c6cdda312638103ef5c3c2f5661e62
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit ffec46faf1559b498eb4fb2a27a520be276fd94d by Pau Espin Pedrol
hnbgw: Introduce test TC_cs_iu_release_req_rua_disconnect

Related: SYS#6602
Change-Id: I6782920c4a86d3311eb54239ab13a18e393c1ec0
The file was modifiedhnbgw/HNBGW_Tests.ttcn
The file was modifiedhnbgw/expected-results.xml
The file was modifiedlibrary/ranap/RANAP_Templates.ttcn
Commit cd30b5380cfc6f0400989852fea35d74ce7c9ec6 by Oliver Smith
hnbgw: fixup for expect_compl_l3_success

During my rebase of Neels patch, I've missed setting
expect_compl_l3_success in t_pars(), leading to:

  HNBGW_Tests.ttcn:571 Dynamic test case error: Text encoder: Encoding an unbound boolean value.

For a lot of tests. Also add the parameter to f_TestHdlrParams() for
consistency.

Fixes: 25fc127c ("hnbgw: test for RUA Disconnect when there is no CN")
Change-Id: Idbfcb77a80d74f7715ef1f84ba4cbfdb08483a5c
The file was modifiedhnbgw/HNBGW_Tests.ttcn
The file was modifiedhnbgw/ConnHdlr.ttcn
Commit 2f6d1bb9be96a48414bf402201b949c75e0e13bb by Pau Espin Pedrol
hnbgw: Rename RAB helper functions to be CS specific

Change-Id: If8a97fe847083e95a480006d147ff59be695b713
The file was modifiedhnbgw/ConnHdlr.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit ab24560830c80b1f676b33ba8c8beeec636ea394 by Pau Espin Pedrol
hnbgw: Use g_pars.mgcp_pars directly during RAB CS setup

Change-Id: I1f699e197e29f912ad06378f10563063aa291af3
The file was modifiedhnbgw/ConnHdlr.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit a487d2b0e8c349d50f68e7f5c43c0ef939b07736 by Oliver Smith
hnbgw/expected-results: update

Add:
* TC_hnb_disconnected_timeout
* TC_mscpool_L3Compl_no_cn
* TC_sgsnpool_L3Compl_no_cn

Fixes: 25fc127c ("hnbgw: test for RUA Disconnect when there is no CN")
Change-Id: Ib126ff53aa9edfeb94f5e7e058145bd4fbe7b604
The file was modifiedhnbgw/expected-results.xml
Commit 9eb5e696a0997e0de8db0248ba8be31ebb2cdac9 by Oliver Smith
testenv: make podman stop more robust

Terminate the watchdog process before killing the podman container. This
avoids bogus errors from a race condition where the container gets
killed first, and then the watchdog process tries to feed the watchdog
and fails:

  [testenv] Stopping podman container
  [testenv] + ['podman', 'kill', 'testenv-hnbgw-all-osmocom-latest-20241031-1222-f34534a5-1']
  e41700779a8ca5daf18ac5daa27d59a84d8442196e352f2756a19baf0592cf89
  Error: no container with name or ID testenv-hnbgw-all-osmocom-latest-20241031-1222-f34534a5-1 found: no such container
  [testenv] podman container crashed!

While at it, use "check=False" with the "podman kill" command, so we
avoid additional error messages if the container was already killed at
that point (could happen through a bug). If we fail to kill it here, it
is not a problem because the watchdog will ensure it terminates shortly
after the watchdog process was stopped.

Related: OS#6607
Change-Id: I6c67273af5b6a80ae0c94e14cb92e3784807c21d
The file was modified_testenv/testenv/podman.py
Commit ec53670dee3ab32dc75b8c9196aa363ac7df3ac2 by Pau Espin Pedrol
hnbgw: Move gtp_pars to Connhdlr

Change-Id: I40f723256b592d0d9141dfd192a1623a4804b4ea
The file was modifiedhnbgw/ConnHdlr.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit a75e766b02e7b74e6140806193ad507053363ed5 by Pau Espin Pedrol
hnbgw: Introduce PfcpParameters in TestHdlrParameters

This allows creating generic functions to establish PS RABs based on
test setup configuration.

Change-Id: I5de50bb7032891a073e4e4e25b2dc86bc84e3d60
The file was modifiedhnbgw/ConnHdlr.ttcn
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit 6d675c717d9664baf683842234fcba3ca1e97fd6 by Oliver Smith
bsc: testenv: set MTU=1500 for lo

Two tests are failing if the MTU is 65536 instead of 1500. This is an
upstream bug in titan.TestPorts.SCTPasp:
https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.SCTPasp/-/issues/3

Add a workaround so the behavior of the test environment is the same as
with docker-playground and the tests can pass again.

Related: OS#6602
Change-Id: Ifeda66954263fe8d2637377d0701a2208a19c332
The file was added_testenv/data/scripts/podman_set_lo_mtu.sh
The file was modified_testenv/testenv/podman.py
The file was modifiedbsc/testenv_generic.cfg
Commit d991fde10de5760eef57a5bea3c1a5fe29428251 by Pau Espin Pedrol
hnbgw: Merge TC_ps_rab_assignment_* testcases

Change-Id: Ibfc3a7d74494bd78d8cfb4efa535ab4cd1b07cae
The file was modifiedhnbgw/expected-results.xml
The file was modifiedhnbgw/HNBGW_Tests.ttcn
Commit 808269ffed9881de31ad566eb0c7e3cfad44108a by Pau Espin Pedrol
hnbgw: Move normal condition Iu Release procedure to helper function

Change-Id: I5dc7923b78d1b98fea1f71aa6e39c41f70b1f3e6
The file was modifiedhnbgw/HNBGW_Tests.ttcn
The file was modifiedhnbgw/ConnHdlr.ttcn
Commit ae63e3b80af1fb8153a0831555475b78a04d34e3 by Pau Espin Pedrol
hnbgw: Tear down SCCP conn from CN under normal conditions

Specs mention that under normal conditions the CN is the one expected to
tear down the SCCP underlaying connection upon recieving
Iu-ReleaseComplete.

Change-Id: I920cabcb63ca352db0ed06e4c35dade52bae5399
The file was modifiedlibrary/SCCP_Templates.ttcn
The file was modifiedhnbgw/ConnHdlr.ttcn