Commit Graph

39 Commits

Author SHA1 Message Date
Alexander Couzens 0f0409842a ns: fr: fix ttcn & osmo-ns-dummy.cfg
The configuration needs to match the expectation of the test cases.

Change-Id: I6fb6265a2e432e8887f5caea8716b95adee7101c
2021-10-19 18:44:50 +02:00
Oliver Smith f8fe1329e2 regen_makefile.sh: set executable name explicitly
Set the executable name in each regen_makefile.sh explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 regen_makefile.sh: files/flags in separate lines
Make all regen_makefile.sh more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Alexander Couzens 6d916910a3 ns: add test case TC_tx_blocked_foreign_nsvc
Check if a BLOCK PDU over a different/foreign connection is parsed.
* 2x initialize NSVC (RESET/UNBLOCK)
* TTCN  0-> NS: block (nsvci 1)
* TTCN  <-0 NS: block ack (nsvci 1)
* TTCN  1-> NS: unit data (nsvci 1)
* TTCN  <-1 NS: status (blocked)

Change-Id: I2b37a712bd70037b35b9deb8dab4a72d1e1d29fb
2021-10-11 15:18:48 +00:00
Alexander Couzens 9061ebd70f ns2: add tc TC_mirror_unitdata_tx_status_blocked
Change-Id: I9be2037b9228d2400bd293841ae6b957cb25c501
2021-09-07 12:42:48 +00:00
Alexander Couzens 13b3ec8534 ns: add test case for SIZE after a successful configuration
Change-Id: I5a7d55e9b3d28872baa4259f33333db8c0d6081d
2021-09-07 12:42:48 +00:00
Alexander Couzens 357c572ad2 ns: add test case for UNITDATA transmission
Change-Id: I5f59581d4257436eb9651c0c5ab5dd002f23d834
2021-09-07 12:42:48 +00:00
Alexander Couzens 24788049b8 ns: fix missing f_ prefix for function f_tx_block_by_vty
All function should have this prefix

Change-Id: Id7b692b3b76946b36dcaa3d23b32b5ccb5007702
2021-09-07 12:42:48 +00:00
Alexander Couzens 3674405a1b ns: always clean up the ns_codec
The f_clean_ns_codec() was introduced later to clean up the ns_codec
properly.

Change-Id: I7a84f75ebd1c68b3c0a6b55b8c49903c51dd6b92
2021-09-07 12:42:48 +00:00
Alexander Couzens 94d3d10777 ns: add tests to test UNITDATA over a BLOCKED nsvcs
The UNITDATA should be rejected by a NS STATUS PDU.

Change-Id: I62ce93ca4953f8b0476a15479089db2f6c2fa684
2021-09-07 12:42:48 +00:00
Alexander Couzens 717bb2167b ns: add TC_sns_sgsn_size_correct_port to check if SIZE_ACK is transmitted from the correct port
Change-Id: Ib0fbf0cc87ff8f00fd4062b471d7a4835b45723c
2021-09-07 12:42:48 +00:00
Alexander Couzens bdef810edc ns: f_init_vty: only reset SNS configuration when using SNS.
Change-Id: I9ecf0abe29e5acdd18f4b18b340baeb442cc09b6
2021-09-07 12:42:48 +00:00
Alexander Couzens fdfe638cff ns: add TC_sns_bss_remove_bind_fail_sns to check SNS fails correct when removing a bind
This TC produces an abort of the ns2 dummy by the memory sanitizer.
Test if SNS fails when removing a bind which has the last valid connection.
The ns2 has 2 binds, ttcn3 1 bind. There are 2 NSVCs.

Bind -- NSVCs -- Bind.

(ns2)      (ttcn3)
1*-----------*1
            /
2*-broken--/

Remove the 1st ns2 bind after the other NSVC has failed.

Change-Id: I8f7daee7a3bcadf64e8ae607619425adbefe3c4b
2021-09-07 12:42:48 +00:00
Alexander Couzens 3921fb5b43 ns2: add TC_sns_sgsn_add_change_del similiar to the bss side
1. do SNS configuration
2. add a bind
3. receive the SNS_ADD
4. before answering the SNS_ADD, change the weight via vty and remove the bind

Change-Id: I1a3d2273279f3def0d225ba78d400fb52a958c64
2021-09-04 00:10:40 +02:00
Alexander Couzens 8a682d6d0c ns2: add TC_sns_sgsn_del to test SNS DEL on the SGSN side
Test the SNS DEL procedure when ns2 is operating the SGSN side.

Change-Id: If519da5212470957b922c569b2b8e5a50e12a8a8
2021-09-04 00:07:38 +02:00
Alexander Couzens 8122ed2bfc ns2: mark TC_sns_bss_all_signalling_nsvcs_failed as broken
The test case tests the wrong side. The signalling
and data weight are valid for the other side. The correct
test case needs to add a second bind on the ttcn3 side because
the signalling and data weight is valid for the remote side.

Change-Id: Ice79a038b0b8df9e69232bb24b2f2b18b3632758
2021-09-03 22:48:42 +02:00
Alexander Couzens 6b51a3c866 ns2: add TC_sns_sgsn_add to test SNS ADD on the SGSN role
Change-Id: I7474ea81ee905fb9fffb6c413b312e0b3547ea14
2021-09-03 22:48:42 +02:00
Alexander Couzens 358c74c0ae ns2: add first sgsn test case TC_sns_sgsn_config_success
Checks if the SGSN can success configures a SNS.

Change-Id: Ibacc2f6ad3053ff7b1e00054cabb9ec7010ffab2
2021-09-03 22:48:42 +02:00
Alexander Couzens de3dfaafc6 ns2: introduce module parameter SnsRole
Allow the .cfg to define which tests should be run.
The new SGSN role SNS tests have their own configurations for
TTCN3 and osmo-nsdummy.

Change-Id: If8162f256428e2e1f353ffbf42a7c0cd24bcecd9
2021-09-03 22:48:42 +02:00
Alexander Couzens 79606cfcbc ns2: rename TC_sns_config_success -> TC_sns_bss_config_success
SGSN test cases will be introduced later. Prefix all bss testcases

Change-Id: I56b074649e64d8e8469ff133d4f298ebf07707ae
2021-08-12 02:11:26 +00:00
Alexander Couzens 5eeebaa974 ns2: add a dummy test case TC_idle() for manual test cases
The TC_idle() won't be call by the control as this TC is only intended for manual
human based testing.

Change-Id: Ie1b5936447755dcaebd65396b7bb5cc3f31c17b5
2021-08-12 02:11:26 +00:00
Alexander Couzens 31f815033d ns2: add test case to call force unconfigured after SNS Size received
The old ns dummy crashed when calling force unconfigured while sending
SNS SIZE.

Change-Id: I16d89391c0d665485cf453c260531023de6096fb
2021-08-12 02:11:26 +00:00
Neels Hofmeyr cb8d9894af update expected-results.xml files
Change-Id: Idcf764cd2d251210bb123d2a5ea782cda0d670b7
2021-07-05 13:11:14 +02:00
Alexander Couzens bd6e9a1da9 RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
RAW_NS used previous a single TTCN3 port for a single UDP port
(source/listen side).
This has the limitation that only a single NSVC could be tested for a
local UDP port. However SNS tests require multiple NSVCs over a single UDP port.
NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation.
Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use
multiple NSVCs.

Related: OS#5036
Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976
2021-06-15 20:20:44 +00:00
Alexander Couzens 1650b165ea ns: test if SNS fails when all signalling NSVCs failes
As 3GPP TS 48.016 § 7.4b.1.1 specifies this behaviour.
1. do success SNS configuration
2. change sig weight of the seconds inactive bind
3. add second bind to SNS
4. stop reacting to NS_ALIVE on first NSVC (only NSVC with sig weight)
5. expect SNS SIZE

Related: OS#5039
Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
2021-06-13 04:08:51 +02:00
Alexander Couzens e23387a188 NS_Tests: add test case TC_sns_bss_add_change_del
1. do SNS configuration
2. add a bind
3. receive the SNS_ADD
4. before answering the SNS_ADD, change the weight via vty and remove the bind

Related: OS#5036
Change-Id: Ibc565bba4c7e0a0b4dd28a48847dbdb998c8528d
2021-06-10 12:47:41 +00:00
Alexander Couzens 7a62502721 NS_Tests: reset the weights of all udp binds
Some test cases change the weight of the binds. Ensure all test cases
starts with the same configuration.

Related: OS#5036
Change-Id: Iae2ba130b2f7d29ec8b417f07d0bef87f74ce5a4
2021-06-07 01:11:17 +02:00
Alexander Couzens 6f17ecc877 NS_Tests: add testcases for incoming SNS_ADD/DEL procedures
Allow to test add and remove a bind via vty.

Related: OS#5036
Change-Id: I98c04c083521ab38b58e8df9f1aee89445ab536d
2021-06-07 01:11:05 +02:00
Alexander Couzens 6576b00565 ns: add test configuration for SNS
Change-Id: Idda139c7adda3fb1fec0643a98cd6cf8b436a89e
2021-06-05 15:49:44 +00:00
Harald Welte d73ba5801c ns/gbproxy/sgsn: Update configs to use logging level lnssignal'
In libosmocore I34b8fde2955ecc010d1dcd9512e1bba9211e2c0d we introduced
a new log subsystem; enabel it in the related configs here

Change-Id: Ie3d178e68aa81d5636c87940074cb6582ac2f131
2021-04-21 07:17:38 +00:00
Alexander Couzens 60548b1096 ns: TC_sns_bss_change_weight_timeout rework TC to use g_handle_rx_alive
With g_handle_rx_alive the test case doesn't need to use alt{}
as f_ns_exp takes care of the NS_ALIVE.

Related: OS#5036
Change-Id: I45f4392b556912bf60859f354a5687a44e6beeb1
2021-04-19 00:52:33 +02:00
Alexander Couzens a93cc364a8 ns: TC_sns_bss_change_weight_timeout: fix expected SNS_SIZE PDU
Allow to work with IPv4 and IPv6 endpoints and only expected known required
fields (e.g. NSEI and rst_flag).

Related: OS#5036
Change-Id: I60f669d7c8838d460a14c6604c4375a8d47f5149
2021-04-19 00:52:25 +02:00
Alexander Couzens 6c723fb7b4 ns: SNS: add testcase to test change_weight retries
Change-Id: Ie8d976a81abe0bcff53bb74991d428dbf1fe314b
2021-03-20 16:41:42 +01:00
Alexander Couzens d5ac510648 ns: SNS: add bss change weight testcase
Do a normal SNS configuration. Afterwards the BSS will change
the weights of the endpoints

Change-Id: I691b9d26bf3eb8fa65aa02eba3efd0fd3869fc2a
2021-03-20 16:41:01 +01:00
Alexander Couzens cbee32a9a7 ns: SNS: add first SNS test case
Do a successful IP-SNS configuration.

Change-Id: I822e3a440db492c91caa3a79acbfd4661852d021
2021-03-02 10:07:29 +01:00
Alexander Couzens e48d355650 ns: SNS: ensure all current testcase are only executed with IPACCESS or RESET_BLOCK dialect
All current test cases are for those 2 dialect. In preparation
of SNS test cases ensure those testcase have the correct dependency.

Change-Id: Ifda066553eabb0ace4aca12e60797c4950fcc498
2021-03-02 10:07:26 +01:00
Pau Espin 4858184bd4 StatsD_Checker: Enable by default
It was previously disabled by default in order to avoid test breakage
with older versions of osmocom projects not supporting them. Since we
just did a new release, all -latest contian now master which should work
fine.

Don't remove the moduleparam yet in order to avoid breakage with some
cfg files in docker-playground.git still setting it to true.

Related: OS#5042
Change-Id: I4e2049c109986906d3c985ca2282174b1abff581
2021-02-26 12:42:35 +01:00
Alexander Couzens 87e44cfe55 ns: fix broken tests by adding weight
The NSConfiguration now requires signalling_weight and data_weight.
Otherwise the tests will fail to an unbound integer.

Change-Id: I4484d48d945d5e6e1711f9bedf3248a24ecc4e76
2021-02-03 15:43:07 +01:00
Alexander Couzens 20cd41ec89 Introduce NS test cases
Related: SYS#5208
Change-Id: Ic619a374b88879d3116f8f28afb14401c3e3192b
2021-01-25 14:14:47 +01:00