From dfdc61de68f9b2942994b4cfe6af4ebb52ffc96e Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 2 Mar 2018 00:40:58 +0100 Subject: msc_vlr_tests: revert IMSI parameter and test nr output Three recently merged commits take the msc_vlr_tests in a wrong direction. The IMSI is usually encoded in the hex streams. The rationale behind hex streams is that it is a) easily copied from a wireshark trace and b) exactly the bytes as sent by an actual phone. It is hard to parameterize the IMSI because we would have to employ our encoding functions, which I intentionally want to keep out of the loop here. The test number should not appear in the normal test output, so that adding a test or changing their order does not affect expected output for following tests. The nr is simply for manual invocation, only seen when invoked with -v. Revert - "VLR tests: always print test parameters" b0a4314911140b1599cccfc8171fcdab4cd9bfab. - "Expand VLR tests" d5feadeee8dd24f991df2892d6bcf0be8b0cf707. - "Move IMSI into test parameters" 093300d141c300651954473d73138b72de04d931. Change-Id: Ie1b49237746751021da88f6f07bbb9f780d077c9 --- tests/msc_vlr/msc_vlr_test_gsm_ciph.c | 41 ++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'tests/msc_vlr/msc_vlr_test_gsm_ciph.c') diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index 541bac1a3..42e620a7b 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -23,11 +23,12 @@ #include "msc_vlr_tests.h" -void test_ciph(uint8_t nr, const char *imsi) +void test_ciph() { struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; - comment_start(nr, imsi); + comment_start(); /* implicit: net->authentication_required = true; */ net->a5_encryption_mask = (1 << 1); @@ -231,14 +232,15 @@ void test_ciph(uint8_t nr, const char *imsi) EXPECT_CONN_COUNT(0); clear_vlr(); - comment_end(nr, imsi); + comment_end(); } -void test_ciph_tmsi(uint8_t nr, const char *imsi) +void test_ciph_tmsi() { struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; - comment_start(nr, imsi); + comment_start(); /* implicit: net->authentication_required = true; */ net->a5_encryption_mask = (1 << 1); @@ -469,14 +471,15 @@ void test_ciph_tmsi(uint8_t nr, const char *imsi) EXPECT_CONN_COUNT(0); clear_vlr(); - comment_end(nr, imsi); + comment_end(); } -void test_ciph_imei(uint8_t nr, const char *imsi) +void test_ciph_imei() { struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; - comment_start(nr, imsi); + comment_start(); /* implicit: net->authentication_required = true; */ net->a5_encryption_mask = (1 << 1); @@ -570,14 +573,15 @@ void test_ciph_imei(uint8_t nr, const char *imsi) EXPECT_CONN_COUNT(0); clear_vlr(); - comment_end(nr, imsi); + comment_end(); } -void test_ciph_imeisv(uint8_t nr, const char *imsi) +void test_ciph_imeisv() { struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; - comment_start(nr, imsi); + comment_start(); /* implicit: net->authentication_required = true; */ net->a5_encryption_mask = (1 << 1); @@ -667,14 +671,15 @@ void test_ciph_imeisv(uint8_t nr, const char *imsi) EXPECT_CONN_COUNT(0); clear_vlr(); - comment_end(nr, imsi); + comment_end(); } -void test_ciph_tmsi_imei(uint8_t nr, const char *imsi) +void test_ciph_tmsi_imei() { struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; - comment_start(nr, imsi); + comment_start(); /* implicit: net->authentication_required = true; */ net->a5_encryption_mask = (1 << 1); @@ -786,12 +791,12 @@ void test_ciph_tmsi_imei(uint8_t nr, const char *imsi) EXPECT_CONN_COUNT(0); clear_vlr(); - comment_end(nr, imsi); + comment_end(); } -void test_lu_unknown_tmsi(uint8_t nr, const char *imsi) +void test_lu_unknown_tmsi() { - comment_start(nr, imsi); + comment_start(); btw("Location Update request with unknown TMSI sends ID Request for IMSI"); lu_result_sent = RES_NONE; @@ -827,7 +832,7 @@ void test_lu_unknown_tmsi(uint8_t nr, const char *imsi) VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); EXPECT_CONN_COUNT(0); clear_vlr(); - comment_end(nr, imsi); + comment_end(); } msc_vlr_test_func_t msc_vlr_tests[] = { -- cgit v1.2.3