tests/tbf: test_tbf_dl_llc_loss(): Fix wrong param passed and wrong expectancies

The DL-TBF in the test gets its TS allocated on TS4 (only that one is
enabled through setup_bts(bts, ts_no=4)), and hence it makes no sense to
ask it to send data on TS7.

Change-Id: Ibe6fc073b7438b8024c4d3ddb0e60c6112752351
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 7067201..ba357e3 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -587,7 +587,7 @@
 
 	OSMO_ASSERT(ms_dl_tbf(ms) != NULL);
 
-	/* Here PCU would answer with data_cnf and trigger
+	/* Here BTS would answer with data_cnf and trigger
 	 * bts_rcv_imm_ass_cnf(), which would trigger TBF_EV_ASSIGN_PCUIF_CNF.
 	 * That in turn would set up timer X2002. Finally, X2002 timeout
 	 * moves it to FLOW state. We set X2002 timeout to 0 here to get
@@ -606,12 +606,13 @@
 		  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
 		{ 0x07, 0x00, 0x02, 0x4d, 0x02, 0x02, 0x02,
 		  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 },
-		{ 0x07, 0x01, 0x04, 0x4d, 0x03, 0x03, 0x03,
+		/* On last DL block, PCU requests polling (DL ACK/NACK): S/P 1 and RRBP 01, hence 0x07 becomes 0xf1 */
+		{ 0x1f, 0x01, 0x04, 0x4d, 0x03, 0x03, 0x03,
 		  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 },
 	};
 
 	while (ms_dl_tbf(ms)->have_data()) {
-		msg = ms_dl_tbf(ms)->create_dl_acked_block(fn += 4, 7);
+		msg = ms_dl_tbf(ms)->create_dl_acked_block(fn += 4, ts_no);
 		fprintf(stderr, "MSG = %s\n", msgb_hexdump(msg));
 		if (!msgb_eq_data_print(msg, exp[expected_data - 1], GSM_MACBLOCK_LEN))
 			fprintf(stderr, "%s failed at %u\n", __func__, expected_data);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 389567e..e38e694 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -1786,9 +1786,12 @@
 TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) Copying 1 RLC blocks, 1 BSNs
 TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) Copying data unit 0 (BSN 2)
 TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) Scheduling Ack/Nack polling, because it was requested explicitly (e.g. first final block sent).
-TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) Polling cannot be scheduled in this TS 7 (control TS PDCH(bts=0,trx=0,ts=4))
-TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) msg block (BSN 2, CS-1): 07 01 04 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 
-MSG = 07 01 04 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 
+PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 12 + 18 = 30
+TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) Scheduled DL Acknowledgement polling on PACCH (FN=30, TS=4)
+TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) starting timer T3191 [final block (DL-TBF)] with 5 sec. 0 microsec, cur_fn=2654167
+TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) Scheduled Ack/Nack polling on FN=30, TS=4
+TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456) msg block (BSN 2, CS-1): 1f 01 04 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 
+MSG = 1f 01 04 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 
 === end test_tbf_dl_llc_loss ===
 MS(IMSI-001001000123456:TLLI-0xc0123456:TA-0:MSCLS-45-0:DL) Destroying MS object
 MS(IMSI-001001000123456:TLLI-0xc0123456:TA-0:MSCLS-45-0) Detaching TBF: TBF(DL:TFI-0-0-0:STATE-FINISHED:GPRS:IMSI-001001000123456:TLLI-0xc0123456)