Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-27 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..


Patch Set 4:

> Patch Set 4:
>
> FYI, this test is failing in jenkins: 
> https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-pcu-test/test_results_analyzer/
>
> I'm not sure if that is expected. The other new test passes.

Yep, it fails on my machine too. For some reason, OsmoPCU changes coding scheme 
later than expected:

  DRLCMACMEAS INFO MS (IMSI ): Link quality 12dB (10dB) left window [5, 8], 
modifying uplink CS level: CS-2 -> CS-3 (gprs_ms.cpp:684)

Either this is a bug, or the test expectations are wrong... This "12dB (10dB)" 
also looks odd.


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 27 Sep 2019 06:49:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-27 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..


Patch Set 4:

FYI, this test is failing in jenkins: 
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-pcu-test/test_results_analyzer/

I'm not sure if that is expected. The other new test passes.


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 27 Sep 2019 06:35:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-26 Thread fixeria
fixeria has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..

PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

This change introduces a new test case TC_cs_lqual_ul_tbf, which
is aimed to test the feedback of OsmoPCU on changing link quality
measurements in Uplink Data blocks during an active TBF.

Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Related: SYS#4607
---
M library/RLCMAC_Types.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 102 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn
index f3deafc..39c0c97 100644
--- a/library/RLCMAC_Types.ttcn
+++ b/library/RLCMAC_Types.ttcn
@@ -312,7 +312,7 @@
mac_hdr := {
payload_type := (MAC_PT_RLCMAC_NO_OPT, 
MAC_PT_RLCMAC_OPT),
rrbp:= ?,
-   rrbp_valid := true,
+   rrbp_valid := ?,
usf := ?
},
opt := *,
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index fa464a3..7e6611d 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -21,6 +21,9 @@
 import from GSM_Types all;
 import from GSM_RR_Types all;

+import from RLCMAC_CSN1_Types all;
+import from RLCMAC_Types all;
+
 import from NS_Types all;
 import from BSSGP_Types all;
 import from Osmocom_Gb_Types all;
@@ -596,6 +599,103 @@
}
 }

+/* Default link quality adaptation (Coding Scheme) ranges:
+/* CS1: ... 6 dB, CS2: 5 .. 8 dB, CS3: 7 .. 13 db, CS4: 12 ... dB */
+private template integer CS1_lqual_dB_range := (-infinity .. 6);
+private template integer CS2_lqual_dB_range := (5 .. 8);
+private template integer CS3_lqual_dB_range := (7 .. 13);
+private template integer CS4_lqual_dB_range := (12 .. infinity);
+
+testcase TC_cs_lqual_ul_tbf() runs on RAW_PCU_Test_CT {
+   var PacketUlAssign ul_tbf_ass;
+   var RlcmacDlBlock dl_block;
+   var PCUIF_Message pcu_msg;
+   var GsmRrMessage rr_msg;
+   var octetstring data;
+   var boolean ok;
+
+   /* Initialize the PCU interface abstraction */
+   f_init_raw(testcasename());
+
+   /* Establish an Uplink TBF */
+   ok := f_establish_tbf(rr_msg);
+   if (not ok) {
+   setverdict(fail, "Failed to establish an Uplink TBF");
+   mtc.stop;
+   }
+
+   /* Make sure we received an UL TBF Assignment */
+   /* TODO: check if we got single or dynamic assignment */
+   if (match(rr_msg, tr_IMM_TBF_ASS(dl := false, rest := 
tr_IaRestOctets_ULAss(? {
+   ul_tbf_ass := 
rr_msg.payload.imm_ass.rest_octets.hh.pa.uldl.ass.ul;
+   log("Rx Uplink TBF assignment: ", ul_tbf_ass);
+   setverdict(pass);
+   } else {
+   setverdict(fail, "Failed to match UL TBF Assignment");
+   mtc.stop;
+   }
+
+   var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA(
+   tfi := ul_tbf_ass.dynamic.tfi_assignment,
+   cv := 15, /* 15 UL blocks to be sent (to be overridden in loop) 
*/
+   bsn := 0, /* TODO: what should be here? */
+   blocks := { /* To be generated in loop */ });
+
+   /* HACK: patch missing TLLI; otherwise OsmoPCU rejects DATA.req */
+   ul_data.data.tlli := '0001'O;
+
+   /* 16 UL blocks (0 .. 32 dB, step = 2 dB) */
+   for (var integer i := 0; i < 16; i := i + 1) {
+   /* Prepare a new UL block (CV, random payload) */
+   ul_data.data.mac_hdr.countdown := (15 - i);
+   ul_data.data.blocks := { 
valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) };
+
+   /* Encode the payload of DATA.ind */
+   data := enc_RlcmacUlBlock(valueof(ul_data));
+   data := f_pad_oct(data, 23, '00'O); /* CS-1 */
+
+   /* Link quality in dB and our CS1-4 expectations */
+   var integer lqual := i * 2;
+
+   /* Enqueue DATA.ind (both TDMA frame and block numbers to be 
patched) */
+   log("Sending DATA.ind with link quality (dB): ", lqual);
+   BTS.send(ts_PCUIF_DATA_IND(bts_nr := 0, trx_nr := 0, ts_nr := 
7, block_nr := 0,
+  sapi := PCU_IF_SAPI_PDTCH, data := 
data,
+  fn := 0, arfcn := 871, lqual_cb := 
lqual * 10));
+   BTS.receive(tr_RAW_PCU_EV(TDMA_EV_PDTCH_BLOCK_SENT));
+
+   /* Enqueue RTS.req, expect DATA.req with UL ACK from the 

Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 26 Sep 2019 19:23:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-26 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 26 Sep 2019 10:45:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-26 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..


Patch Set 3: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/15526/3/library/RLCMAC_Types.ttcn
File library/RLCMAC_Types.ttcn:

https://gerrit.osmocom.org/#/c/15526/3/library/RLCMAC_Types.ttcn@315
PS3, Line 315: ?
This change is fine, the only other place where tr_RLCMAC_ACK_NACK is used, is 
in PCU_Tests.ttcn:f_ul_tbf() (and the whole PCU_Tests.ttcn file is getting 
obsoleted by this new infrastructure that you are adding to PCU Tests RAW).



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 26 Sep 2019 09:31:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-25 Thread fixeria
Hello pespin, laforge, osmith, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526

to look at the new patch set (#3).

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..

PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

This change introduces a new test case TC_cs_lqual_ul_tbf, which
is aimed to test the feedback of OsmoPCU on changing link quality
measurements in Uplink Data blocks during an active TBF.

Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Related: SYS#4607
---
M library/RLCMAC_Types.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 102 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/26/15526/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-20 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 20 Sep 2019 15:31:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-19 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 19 Sep 2019 10:13:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-19 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526 )

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 19 Sep 2019 08:43:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

2019-09-18 Thread fixeria
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526

to look at the new patch set (#2).

Change subject: PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
..

PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation

This change introduces a new test case TC_cs_lqual_ul_tbf, which
is aimed to test the feedback of OsmoPCU on changing link quality
measurements in Uplink Data blocks during an active TBF.

Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Related: SYS#4607
---
M library/RLCMAC_Types.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 127 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/26/15526/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15526
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Gerrit-Change-Number: 15526
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset