laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/42623?usp=email )
Change subject: Reset 'release_99' flag in test cases at comment_start() ......................................................................
Reset 'release_99' flag in test cases at comment_start()
Rather than resetting release_99 flag in every test case that did set it, do it in comment_start().
Change-Id: I55a49dd24a5df6ee8e28fa6b410988e82d10c554 --- M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_tests.h 5 files changed, 4 insertions(+), 11 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve
diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c index 181c073..98708a4 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c @@ -258,7 +258,6 @@ gsup_expect_tx("0c010809710000000156f0" CN_DOMAIN VLR_TO_HLR); ms_sends_msg("050130" "089910070000106005" /* IMSI */); - release_99 = false; ASSERT_RELEASE_CLEAR(via_ran); ran_sends_clear_complete(via_ran);
diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 0ddba96..bfee0fc 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -321,7 +321,6 @@ EXPECT_CONN_COUNT(0); clear_vlr(); comment_end(); - release_99 = false; }
static void test_call_mt() @@ -458,7 +457,6 @@ EXPECT_CONN_COUNT(0); clear_vlr(); comment_end(); - release_99 = false; }
static void test_call_mt2() @@ -584,7 +582,6 @@
clear_vlr(); comment_end(); - release_99 = false; }
static void test_call_mo_to_unknown() @@ -683,7 +680,6 @@ EXPECT_CONN_COUNT(0); clear_vlr(); comment_end(); - release_99 = false; }
static void test_call_mo_to_unknown_timeout() @@ -783,7 +779,6 @@ EXPECT_CONN_COUNT(0); clear_vlr(); comment_end(); - release_99 = false; }
#define LIST_END 0xffff @@ -1637,7 +1632,6 @@ EXPECT_CONN_COUNT(0); clear_vlr(); comment_end(); - release_99 = false; }
msc_vlr_test_func_t msc_vlr_tests[] = { diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index 0c9883d..d7c4e8f 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -1055,7 +1055,6 @@ ms_sends_msg("050130" "089910070000106005" /* IMSI */); VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); - release_99 = false;
ran_sends_clear_complete(); EXPECT_CONN_COUNT(0); diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.c b/tests/msc_vlr/msc_vlr_test_umts_authen.c index 168173c..b23b16e 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.c +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.c @@ -341,7 +341,6 @@ gsup_expect_tx("0c010809710000000156f0" CN_DOMAIN VLR_TO_HLR); ms_sends_msg("050130" "089910070000106005" /* IMSI */); - release_99 = false; ASSERT_RELEASE_CLEAR(via_ran); ran_sends_clear_complete(via_ran);
@@ -603,7 +602,6 @@ btw("MS sends TMSI Realloc Complete"); expect_release_clear(via_ran); ms_sends_msg("055b"); - release_99 = false; ASSERT_RELEASE_CLEAR(via_ran); ran_sends_clear_complete(via_ran);
diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 2938d96..ae1bcdb 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -53,7 +53,10 @@ #define btw(fmt, args...) _log("- " fmt, ## args ) #define log(fmt, args...) _log(" " fmt, ## args )
-#define comment_start() fprintf(stderr, "===== %s\n", __func__); +#define comment_start() do { \ + fprintf(stderr, "===== %s\n", __func__); \ + release_99 = false; \ + } while (false) #define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__);
extern void *msc_vlr_tests_ctx;