pespin has uploaded this change for review.

View Change

tests/gmm: Avoid printing rej_cause if GMMSM-Establish.cnf outcome is accepted

Otherwise it prints memory regions not really filled in.

Change-Id: I9c46e5a42e6b002f51ab19bc5d85b7bdd7da2a4f
---
M tests/gmm/gmm_prim_test.c
M tests/gmm/gmm_prim_test.ok
2 files changed, 19 insertions(+), 5 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/34/32634/1
diff --git a/tests/gmm/gmm_prim_test.c b/tests/gmm/gmm_prim_test.c
index 7bc02b0..b66ca51 100644
--- a/tests/gmm/gmm_prim_test.c
+++ b/tests/gmm/gmm_prim_test.c
@@ -199,10 +199,13 @@
case OSMO_GPRS_GMM_SAP_GMMSM:
switch (OSMO_PRIM_HDR(&gmm_prim->oph)) {
case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_ESTABLISH, PRIM_OP_CONFIRM):
- printf("%s(): Rx %s sess_id=%u accepted=%u rej_cause=%u\n", __func__, pdu_name,
- gmm_prim->gmmsm.sess_id,
- gmm_prim->gmmsm.establish_cnf.accepted,
- gmm_prim->gmmsm.establish_cnf.rej.cause);
+ if (gmm_prim->gmmsm.establish_cnf.accepted)
+ printf("%s(): Rx %s sess_id=%u accepted\n", __func__, pdu_name,
+ gmm_prim->gmmsm.sess_id);
+ else
+ printf("%s(): Rx %s sess_id=%u rejected cause=%u\n", __func__, pdu_name,
+ gmm_prim->gmmsm.sess_id,
+ gmm_prim->gmmsm.establish_cnf.rej.cause);
break;
case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_UNITDATA, PRIM_OP_INDICATION):
printf("%s(): Rx %s sess_id=%u sm_pdu=%s\n", __func__, pdu_name,
diff --git a/tests/gmm/gmm_prim_test.ok b/tests/gmm/gmm_prim_test.ok
index e37507e..80d9a2d 100644
--- a/tests/gmm/gmm_prim_test.ok
+++ b/tests/gmm/gmm_prim_test.ok
@@ -21,7 +21,7 @@
test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0x80001234 new_TLLI=0xea711b41
test_gmm_prim_down_cb(): Rx GMRR-ASSIGN.request old_tlli=0x80001234 new_tlli=0xea711b41
test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[08 03 ]
-test_gmm_prim_up_cb(): Rx GMMSM-ESTABLISH.confirm sess_id=1234 accepted=1 rej_cause=0
+test_gmm_prim_up_cb(): Rx GMMSM-ESTABLISH.confirm sess_id=1234 accepted
test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[0a 28 29 30 ]
test_gmm_prim_up_cb(): Rx GMMSM-UNITDATA.indication sess_id=1234 sm_pdu=0a 28 29 30
==== test_gmm_prim_ms_gmmsm() [end] ====

To view, visit change 32634. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I9c46e5a42e6b002f51ab19bc5d85b7bdd7da2a4f
Gerrit-Change-Number: 32634
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange