don't match on L1CTL SAPI in received frames
L1 has no idea about the SAPI encoded in LAPDm when it passes a
PH-DATA.ind up to us. So dont match on that L1CTL field, only match the
SAPI we decoded from LAPDm header.
diff --git a/lapd/L1CTL_Test.ttcn b/lapd/L1CTL_Test.ttcn
index e3d149e..acd19cc 100644
--- a/lapd/L1CTL_Test.ttcn
+++ b/lapd/L1CTL_Test.ttcn
@@ -89,10 +89,10 @@
log("====> expecting ", t_PH_DATA(sapi, use_sacch, LAPDm_B_UA(sapi, payload)));
T.start
alt {
- [] LAPDM.receive(t_PH_DATA(sapi, use_sacch, LAPDm_B_UA(sapi, payload))) { result := true; }
- [] LAPDM.receive(t_PH_DATA(sapi, use_sacch, ?)) -> value phd { log("Other msg on DCH: ", phd); repeat; }
+ [] LAPDM.receive(t_PH_DATA(?, use_sacch, LAPDm_B_UA(sapi, payload))) { result := true; }
+ [] LAPDM.receive(t_PH_DATA(?, use_sacch, ?)) -> value phd { log("Other msg on DCH: ", phd); repeat; }
[] LAPDM.receive(t_PH_DATA(?, ?, ?)) -> value phd { log("Other PH-DATA: ", phd); repeat; }
- [] T.timeout { setverdict(fail); }
+ [] T.timeout { }
}
f_release_dcch();
return result;
@@ -108,24 +108,24 @@
testcase TC_sabm_ua_dcch_sapi0_nopayload() runs on dummy_CT {
f_init();
- if (not f_test_sabm_results_in_ua(0, false, ''O)) {
- setverdict(fail);
+ if (f_test_sabm_results_in_ua(0, false, ''O)) {
+ setverdict(fail, "Initial SABM/UA must contain L3 payload but BTS accepts without");
}
setverdict(pass);
}
testcase TC_sabm_ua_dcch_sapi3() runs on dummy_CT {
f_init();
- if (not f_test_sabm_results_in_ua(3, false, 'FEFE'O)) {
- setverdict(fail);
+ if (f_test_sabm_results_in_ua(3, false, 'FEFE'O)) {
+ setverdict(fail, "Initial SABM/UA must be on SAPI0, but BTS accepts SAPI=3");
}
setverdict(pass);
}
testcase TC_sabm_ua_dcch_sapi4() runs on dummy_CT {
f_init();
- if (not f_test_sabm_results_in_ua(4, false, 'FEFE'O)) {
- setverdict(fail);
+ if (f_test_sabm_results_in_ua(4, false, 'FEFE'O)) {
+ setverdict(fail, "Initial SABM/UA must be on SAPI0, but BTS accepts SAPI=4");
}
setverdict(pass);
}