osmo-ttcn3-hacks[master]: test GGSN support for optional GTP-U sequence numbers

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Apr 4 08:03:42 UTC 2018


Patch Set 1:

(10 comments)

https://gerrit.osmocom.org/#/c/7623/1/ggsn_tests/GGSN_Tests.ttcn
File ggsn_tests/GGSN_Tests.ttcn:

Line 196: 			} while (g_d_seq_nr == 0);
> All this way of differentiating looks tricky. What about if we want to test
I agree. The more "TTCN-3-esque" solution would probably be to pass "omit" (i.e. a "template (omit) uint16_t") into the ts_GTP1U_GPDU,...


Line 199: 			GTPU.send(ts_GTP1U_GPDU(g_peer_u, 0, ctx.teid_remote, data));
so you would pass omit instead of 0 here


Line 902: 		f_pdp4_clients_interact();
> Aren't you modifying the default value used for use_gptu_txseq here and thu
the entire test component is re-created for every test.  Thus, the default initializers from the 'type component GT_CT' are applied before entering each test case.  No need for restoring anything explicitly.


https://gerrit.osmocom.org/#/c/7623/1/library/GTP_Templates.ttcn
File library/GTP_Templates.ttcn:

Line 548: 	function f_GTPU_s_bit(in uint16_t seq) return BIT1 {
have "template (omit) uint16_t seq" here


Line 549: 		if (seq == 0) {
have "if (istemplatekind(seq, "omit"))" here


Line 555: 	function f_GTPU_opt_part(in uint16_t seq) return template (omit) GTPU_Header_optional_part {
same as above


Line 556: 		if (seq == 0) {
same as above


Line 560: 			sequenceNumber := int2oct(seq, 2),
valueof(seq) if you turn it into a template


Line 569: 	template PDU_GTPU ts_GTP1U_PDU(OCT1 msg_type, uint16_t seq, OCT4 teid, GTPU_IEs ies) := {
"template (omit) uint16_t seq"


Line 576: 		s_bit := f_GTPU_s_bit(seq), /* a sequence number of 0 means the caller provided none */
as you remove the comment "e assume the encoder overwrites this if an optional part is given": Can you confirm that the encoder is not automatically filling in s_bit depending on whether an optional part is present or not?


-- 
To view, visit https://gerrit.osmocom.org/7623
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1dc299407c61b1c865035add44067b8ab89001b3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list