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"
  b0a4314911.
- "Expand VLR tests"
  d5feadeee8.
- "Move IMSI into test parameters"
  093300d141.

Change-Id: Ie1b49237746751021da88f6f07bbb9f780d077c9
This commit is contained in:
Neels Hofmeyr 2018-03-02 00:40:58 +01:00
parent c5e0ace751
commit dfdc61de68
35 changed files with 330 additions and 316 deletions

View File

@ -284,46 +284,46 @@ void _test_auth_reuse(enum ran_type via_ran,
clear_vlr();
}
void test_auth_use_twice_geran(uint8_t nr, const char *imsi)
void test_auth_use_twice_geran()
{
comment_start(nr, imsi);
comment_start();
_test_auth_reuse(RAN_GERAN_A, 1, 1, true);
comment_end(nr, imsi);
comment_end();
}
void test_auth_use_twice_utran(uint8_t nr, const char *imsi)
void test_auth_use_twice_utran()
{
comment_start(nr, imsi);
comment_start();
_test_auth_reuse(RAN_UTRAN_IU, 1, 1, true);
comment_end(nr, imsi);
comment_end();
}
void test_auth_use_infinitely_geran(uint8_t nr, const char *imsi)
void test_auth_use_infinitely_geran()
{
comment_start(nr, imsi);
comment_start();
_test_auth_reuse(RAN_GERAN_A, -1, 3, false);
comment_end(nr, imsi);
comment_end();
}
void test_auth_use_infinitely_utran(uint8_t nr, const char *imsi)
void test_auth_use_infinitely_utran()
{
comment_start(nr, imsi);
comment_start();
_test_auth_reuse(RAN_UTRAN_IU, -1, 3, false);
comment_end(nr, imsi);
comment_end();
}
void test_no_auth_reuse_geran(uint8_t nr, const char *imsi)
void test_no_auth_reuse_geran()
{
comment_start(nr, imsi);
comment_start();
_test_auth_reuse(RAN_GERAN_A, 0, 0, true);
comment_end(nr, imsi);
comment_end();
}
void test_no_auth_reuse_utran(uint8_t nr, const char *imsi)
void test_no_auth_reuse_utran()
{
comment_start(nr, imsi);
comment_start();
_test_auth_reuse(RAN_UTRAN_IU, 0, 0, true);
comment_end(nr, imsi);
comment_end();
}
msc_vlr_test_func_t msc_vlr_tests[] = {

View File

@ -1,4 +1,4 @@
===== [1] test_auth_use_twice_geran(901700000004620)...
===== test_auth_use_twice_geran
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -421,12 +421,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [1] test_auth_use_twice_geran(901700000004620): SUCCESS
===== test_auth_use_twice_geran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [2] test_auth_use_twice_utran(901700000004620)...
===== test_auth_use_twice_utran
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -875,12 +875,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
iu_release_sent == 1
llist_count(&net->subscr_conns) == 0
===== [2] test_auth_use_twice_utran(901700000004620): SUCCESS
===== test_auth_use_twice_utran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [3] test_auth_use_infinitely_geran(901700000004620)...
===== test_auth_use_infinitely_geran
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1396,12 +1396,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [3] test_auth_use_infinitely_geran(901700000004620): SUCCESS
===== test_auth_use_infinitely_geran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [4] test_auth_use_infinitely_utran(901700000004620)...
===== test_auth_use_infinitely_utran
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1951,12 +1951,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
iu_release_sent == 1
llist_count(&net->subscr_conns) == 0
===== [4] test_auth_use_infinitely_utran(901700000004620): SUCCESS
===== test_auth_use_infinitely_utran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [5] test_no_auth_reuse_geran(901700000004620)...
===== test_no_auth_reuse_geran
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -2272,12 +2272,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [5] test_no_auth_reuse_geran(901700000004620): SUCCESS
===== test_no_auth_reuse_geran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [6] test_no_auth_reuse_utran(901700000004620)...
===== test_no_auth_reuse_utran
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -2611,7 +2611,7 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
iu_release_sent == 1
llist_count(&net->subscr_conns) == 0
===== [6] test_no_auth_reuse_utran(901700000004620): SUCCESS
===== test_no_auth_reuse_utran: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7

View File

@ -1,2 +1 @@
Testing for IMSI 901700000004620
Done

View File

@ -151,13 +151,13 @@ static void standard_lu()
vlr_subscr_put(vsub);
}
void test_call_mo(uint8_t nr, const char *imsi)
void test_call_mo()
{
struct gsm_mncc mncc = {
.imsi = IMSI,
};
comment_start(nr, imsi);
comment_start();
fake_time_start();
@ -248,17 +248,17 @@ void test_call_mo(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_call_mt(uint8_t nr, const char *imsi)
void test_call_mt()
{
struct gsm_mncc mncc = {
.imsi = IMSI,
.callref = 0x423,
};
comment_start(nr, imsi);
comment_start();
fake_time_start();
@ -331,7 +331,7 @@ void test_call_mt(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
msc_vlr_test_func_t msc_vlr_tests[] = {

View File

@ -1,4 +1,4 @@
===== [1] test_call_mo(901700000004620)...
===== test_call_mo
- Total time passed: 0.000000 s
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
@ -342,12 +342,12 @@ DRLL subscr MSISDN:42342: Freeing subscriber connection
DREF VLR subscr MSISDN:42342 usage decreases to: 1
llist_count(&net->subscr_conns) == 0
DREF freeing VLR subscr MSISDN:42342
===== [1] test_call_mo(901700000004620): SUCCESS
===== test_call_mo: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [2] test_call_mt(901700000004620)...
===== test_call_mt
- Total time passed: 0.000000 s
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
@ -696,7 +696,7 @@ DRLL subscr MSISDN:42342: Freeing subscriber connection
DREF VLR subscr MSISDN:42342 usage decreases to: 1
llist_count(&net->subscr_conns) == 0
DREF freeing VLR subscr MSISDN:42342
===== [2] test_call_mt(901700000004620): SUCCESS
===== test_call_mt: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7

View File

@ -1,2 +1 @@
Testing for IMSI 901700000004620
Done

View File

@ -23,11 +23,12 @@
#include "msc_vlr_tests.h"
void test_gsm_authen(uint8_t nr, const char *imsi)
void test_gsm_authen()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
@ -209,14 +210,15 @@ void test_gsm_authen(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_gsm_authen_tmsi(uint8_t nr, const char *imsi)
void test_gsm_authen_tmsi()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
net->vlr->cfg.assign_tmsi = true;
@ -485,14 +487,15 @@ void test_gsm_authen_tmsi(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_gsm_authen_imei(uint8_t nr, const char *imsi)
void test_gsm_authen_imei()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
net->vlr->cfg.check_imei_rqd = true;
@ -580,14 +583,15 @@ void test_gsm_authen_imei(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_gsm_authen_tmsi_imei(uint8_t nr, const char *imsi)
void test_gsm_authen_tmsi_imei()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
net->vlr->cfg.assign_tmsi = true;
@ -695,15 +699,15 @@ void test_gsm_authen_tmsi_imei(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_gsm_milenage_authen(uint8_t nr, const char *ignored)
void test_gsm_milenage_authen()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000010650";
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
rx_from_ran = RAN_GERAN_A;
@ -907,7 +911,7 @@ void test_gsm_milenage_authen(uint8_t nr, const char *ignored)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
msc_vlr_test_func_t msc_vlr_tests[] = {

View File

@ -1,4 +1,4 @@
===== [1] test_gsm_authen(901700000004620)...
===== test_gsm_authen
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -441,12 +441,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [1] test_gsm_authen(901700000004620): SUCCESS
===== test_gsm_authen: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [2] test_gsm_authen_tmsi(901700000004620)...
===== test_gsm_authen_tmsi
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1093,12 +1093,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [2] test_gsm_authen_tmsi(901700000004620): SUCCESS
===== test_gsm_authen_tmsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [3] test_gsm_authen_imei(901700000004620)...
===== test_gsm_authen_imei
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1313,12 +1313,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [3] test_gsm_authen_imei(901700000004620): SUCCESS
===== test_gsm_authen_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [4] test_gsm_authen_tmsi_imei(901700000004620)...
===== test_gsm_authen_tmsi_imei
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1564,12 +1564,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [4] test_gsm_authen_tmsi_imei(901700000004620): SUCCESS
===== test_gsm_authen_tmsi_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [5] test_gsm_milenage_authen(901700000010650)...
===== test_gsm_milenage_authen
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1993,7 +1993,7 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [5] test_gsm_milenage_authen(901700000010650): SUCCESS
===== test_gsm_milenage_authen: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7

View File

@ -1,2 +1 @@
Testing for IMSI 901700000004620
Done

View File

@ -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[] = {

View File

@ -1,4 +1,4 @@
===== [1] test_ciph(901700000004620)...
===== test_ciph
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -478,12 +478,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [1] test_ciph(901700000004620): SUCCESS
===== test_ciph: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [2] test_ciph_tmsi(901700000004620)...
===== test_ciph_tmsi
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1000,12 +1000,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [2] test_ciph_tmsi(901700000004620): SUCCESS
===== test_ciph_tmsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [3] test_ciph_imei(901700000004620)...
===== test_ciph_imei
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1221,12 +1221,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [3] test_ciph_imei(901700000004620): SUCCESS
===== test_ciph_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [4] test_ciph_imeisv(901700000004620)...
===== test_ciph_imeisv
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1431,12 +1431,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [4] test_ciph_imeisv(901700000004620): SUCCESS
===== test_ciph_imeisv: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [5] test_ciph_tmsi_imei(901700000004620)...
===== test_ciph_tmsi_imei
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1683,7 +1683,7 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [5] test_ciph_tmsi_imei(901700000004620): SUCCESS
===== test_ciph_tmsi_imei: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7

View File

@ -1,2 +1 @@
Testing for IMSI 901700000004620
Done

View File

@ -23,9 +23,9 @@
#include "msc_vlr_tests.h"
void test_hlr_rej_auth_info_unknown_imsi(uint8_t nr, const char *imsi)
void test_hlr_rej_auth_info_unknown_imsi()
{
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
@ -46,12 +46,12 @@ void test_hlr_rej_auth_info_unknown_imsi(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_hlr_rej_auth_info_net_fail(uint8_t nr, const char *imsi)
void test_hlr_rej_auth_info_net_fail()
{
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
@ -72,14 +72,15 @@ void test_hlr_rej_auth_info_net_fail(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_hlr_rej_auth_info_net_fail_no_reuse_tuples(uint8_t nr, const char *imsi)
void test_hlr_rej_auth_info_net_fail_no_reuse_tuples()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
net->vlr->cfg.auth_reuse_old_sets_on_error = false;
@ -158,14 +159,15 @@ void test_hlr_rej_auth_info_net_fail_no_reuse_tuples(uint8_t nr, const char *ims
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples(uint8_t nr, const char *imsi)
void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
net->vlr->cfg.auth_reuse_old_sets_on_error = true;
@ -245,12 +247,12 @@ void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples(uint8_t nr, const char *
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_hlr_acc_but_no_auth_tuples(uint8_t nr, const char *imsi)
void test_hlr_acc_but_no_auth_tuples()
{
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
net->vlr->cfg.auth_reuse_old_sets_on_error = true;
@ -277,14 +279,15 @@ void test_hlr_acc_but_no_auth_tuples(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_hlr_rej_auth_info_net_fail_reuse_tuples(uint8_t nr, const char *imsi)
void test_hlr_rej_auth_info_net_fail_reuse_tuples()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
net->vlr->cfg.auth_reuse_old_sets_on_error = true;
@ -379,12 +382,12 @@ void test_hlr_rej_auth_info_net_fail_reuse_tuples(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_hlr_rej_lu(uint8_t nr, const char *imsi)
void test_hlr_rej_lu()
{
comment_start(nr, imsi);
comment_start();
btw("Location Update request causes a GSUP LU request to HLR");
lu_result_sent = RES_NONE;
@ -402,12 +405,12 @@ void test_hlr_rej_lu(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_hlr_no_insert_data(uint8_t nr, const char *imsi)
void test_hlr_no_insert_data()
{
comment_start(nr, imsi);
comment_start();
btw("Location Update request causes a GSUP LU request to HLR");
lu_result_sent = RES_NONE;
@ -428,7 +431,7 @@ void test_hlr_no_insert_data(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
msc_vlr_test_func_t msc_vlr_tests[] = {

View File

@ -1,4 +1,4 @@
===== [1] test_hlr_rej_auth_info_unknown_imsi(901700000004620)...
===== test_hlr_rej_auth_info_unknown_imsi
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -69,12 +69,12 @@ DREF freeing VLR subscr IMSI:901700000004620
lu_result_sent == 2
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [1] test_hlr_rej_auth_info_unknown_imsi(901700000004620): SUCCESS
===== test_hlr_rej_auth_info_unknown_imsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [2] test_hlr_rej_auth_info_net_fail(901700000004620)...
===== test_hlr_rej_auth_info_net_fail
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -145,12 +145,12 @@ DREF freeing VLR subscr IMSI:901700000004620
lu_result_sent == 2
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [2] test_hlr_rej_auth_info_net_fail(901700000004620): SUCCESS
===== test_hlr_rej_auth_info_net_fail: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [3] test_hlr_rej_auth_info_net_fail_reuse_tuples(901700000004620)...
===== test_hlr_rej_auth_info_net_fail_reuse_tuples
---
- Submit a used auth tuple in the VLR
- Location Update request causes a GSUP Send Auth Info request to HLR
@ -448,12 +448,12 @@ DREF VLR subscr MSISDN:46071 usage decreases to: 1
lu_result_sent == 1
llist_count(&net->subscr_conns) == 0
DREF freeing VLR subscr MSISDN:46071
===== [3] test_hlr_rej_auth_info_net_fail_reuse_tuples(901700000004620): SUCCESS
===== test_hlr_rej_auth_info_net_fail_reuse_tuples: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [4] test_hlr_rej_auth_info_net_fail_no_reuse_tuples(901700000004620)...
===== test_hlr_rej_auth_info_net_fail_no_reuse_tuples
---
- Submit a used auth tuple in the VLR
- Location Update request causes a GSUP Send Auth Info request to HLR
@ -676,12 +676,12 @@ DREF VLR subscr MSISDN:46071 usage decreases to: 1
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
DREF freeing VLR subscr MSISDN:46071
===== [4] test_hlr_rej_auth_info_net_fail_no_reuse_tuples(901700000004620): SUCCESS
===== test_hlr_rej_auth_info_net_fail_no_reuse_tuples: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [5] test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples(901700000004620)...
===== test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples
---
- Submit a used auth tuple in the VLR
- Location Update request causes a GSUP Send Auth Info request to HLR
@ -905,12 +905,12 @@ DREF VLR subscr MSISDN:46071 usage decreases to: 1
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
DREF freeing VLR subscr MSISDN:46071
===== [5] test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples(901700000004620): SUCCESS
===== test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [6] test_hlr_acc_but_no_auth_tuples(901700000004620)...
===== test_hlr_acc_but_no_auth_tuples
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -980,12 +980,12 @@ DREF freeing VLR subscr IMSI:901700000004620
lu_result_sent == 2
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [6] test_hlr_acc_but_no_auth_tuples(901700000004620): SUCCESS
===== test_hlr_acc_but_no_auth_tuples: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [7] test_hlr_rej_lu(901700000004620)...
===== test_hlr_rej_lu
- Location Update request causes a GSUP LU request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1058,12 +1058,12 @@ DREF freeing VLR subscr IMSI:901700000004620
lu_result_sent == 2
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [7] test_hlr_rej_lu(901700000004620): SUCCESS
===== test_hlr_rej_lu: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [8] test_hlr_no_insert_data(901700000004620)...
===== test_hlr_no_insert_data
- Location Update request causes a GSUP LU request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -1159,7 +1159,7 @@ DREF VLR subscr IMSI:901700000004620 usage decreases to: 1
lu_result_sent == 1
llist_count(&net->subscr_conns) == 0
DREF freeing VLR subscr IMSI:901700000004620
===== [8] test_hlr_no_insert_data(901700000004620): SUCCESS
===== test_hlr_no_insert_data: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7

View File

@ -1,2 +1 @@
Testing for IMSI 901700000004620
Done

View File

@ -25,9 +25,9 @@
#include <osmocom/core/logging.h>
void test_hlr_timeout_lu_auth_info(uint8_t nr, const char *imsi)
void test_hlr_timeout_lu_auth_info()
{
comment_start(nr, imsi);
comment_start();
fake_time_start();
@ -61,12 +61,12 @@ void test_hlr_timeout_lu_auth_info(uint8_t nr, const char *imsi)
VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_hlr_timeout_lu_upd_loc_result(uint8_t nr, const char *imsi)
void test_hlr_timeout_lu_upd_loc_result()
{
comment_start(nr, imsi);
comment_start();
fake_time_start();
@ -108,7 +108,7 @@ void test_hlr_timeout_lu_upd_loc_result(uint8_t nr, const char *imsi)
VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
msc_vlr_test_func_t msc_vlr_tests[] = {

View File

@ -1,4 +1,4 @@
===== [1] test_hlr_timeout_lu_auth_info(901700000004620)...
===== test_hlr_timeout_lu_auth_info
- Total time passed: 0.000000 s
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
@ -77,12 +77,12 @@ DREF freeing VLR subscr IMSI:901700000004620
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
lu_result_sent == 2
===== [1] test_hlr_timeout_lu_auth_info(901700000004620): SUCCESS
===== test_hlr_timeout_lu_auth_info: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [2] test_hlr_timeout_lu_upd_loc_result(901700000004620)...
===== test_hlr_timeout_lu_upd_loc_result
- Total time passed: 0.000000 s
- Location Update request causes a GSUP LU request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
@ -180,7 +180,7 @@ DREF freeing VLR subscr MSISDN:46071
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
lu_result_sent == 2
===== [2] test_hlr_timeout_lu_upd_loc_result(901700000004620): SUCCESS
===== test_hlr_timeout_lu_upd_loc_result: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7

View File

@ -1,2 +1 @@
Testing for IMSI 901700000004620
Done

View File

@ -23,9 +23,9 @@
#include "msc_vlr_tests.h"
void test_ms_timeout_lu_auth_resp(uint8_t nr, const char *imsi)
void test_ms_timeout_lu_auth_resp()
{
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
@ -80,12 +80,12 @@ void test_ms_timeout_lu_auth_resp(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
comment_end(nr, imsi);
comment_end();
}
void test_ms_timeout_cm_auth_resp(uint8_t nr, const char *imsi)
void test_ms_timeout_cm_auth_resp()
{
comment_start(nr, imsi);
comment_start();
net->authentication_required = true;
@ -179,16 +179,17 @@ void test_ms_timeout_cm_auth_resp(uint8_t nr, const char *imsi)
VERBOSE_ASSERT(cm_service_result_sent, == RES_REJECT, "%d");
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_ms_timeout_paging(uint8_t nr, const char *imsi)
void test_ms_timeout_paging()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
fake_time_start();
@ -283,7 +284,7 @@ void test_ms_timeout_paging(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
msc_vlr_test_func_t msc_vlr_tests[] = {

View File

@ -1,4 +1,4 @@
===== [1] test_ms_timeout_lu_auth_resp(901700000004620)...
===== test_ms_timeout_lu_auth_resp
- Total time passed: 0.000000 s
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
@ -97,12 +97,12 @@ DREF freeing VLR subscr IMSI:901700000004620
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
lu_result_sent == 2
===== [1] test_ms_timeout_lu_auth_resp(901700000004620): SUCCESS
===== test_ms_timeout_lu_auth_resp: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [2] test_ms_timeout_cm_auth_resp(901700000004620)...
===== test_ms_timeout_cm_auth_resp
- Total time passed: 0.000000 s
- Location Update request causes a GSUP Send Auth Info request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
@ -333,12 +333,12 @@ DREF VLR subscr MSISDN:46071 usage decreases to: 1
llist_count(&net->subscr_conns) == 0
cm_service_result_sent == 2
DREF freeing VLR subscr MSISDN:46071
===== [2] test_ms_timeout_cm_auth_resp(901700000004620): SUCCESS
===== test_ms_timeout_cm_auth_resp: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [3] test_ms_timeout_paging(901700000004620)...
===== test_ms_timeout_paging
- Total time passed: 0.000000 s
- Location Update request causes a GSUP LU request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
@ -516,7 +516,7 @@ DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
paging_stopped == 1
llist_count(&net->subscr_conns) == 0
===== [3] test_ms_timeout_paging(901700000004620): SUCCESS
===== test_ms_timeout_paging: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7

View File

@ -1,2 +1 @@
Testing for IMSI 901700000004620
Done

View File

@ -23,14 +23,15 @@
#include "msc_vlr_tests.h"
void test_no_authen(uint8_t nr, const char *imsi)
void test_no_authen()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
/* No auth only works on GERAN */
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
btw("Location Update request causes a GSUP LU request to HLR");
lu_result_sent = RES_NONE;
@ -158,16 +159,17 @@ void test_no_authen(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_no_authen_tmsi(uint8_t nr, const char *imsi)
void test_no_authen_tmsi()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
net->vlr->cfg.assign_tmsi = true;
@ -377,16 +379,17 @@ void test_no_authen_tmsi(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_no_authen_imei(uint8_t nr, const char *imsi)
void test_no_authen_imei()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
net->vlr->cfg.check_imei_rqd = true;
@ -444,16 +447,17 @@ void test_no_authen_imei(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_no_authen_tmsi_imei(uint8_t nr, const char *imsi)
void test_no_authen_tmsi_imei()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
net->vlr->cfg.assign_tmsi = true;
net->vlr->cfg.check_imei_rqd = true;
@ -520,17 +524,18 @@ void test_no_authen_tmsi_imei(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_no_authen_imeisv(uint8_t nr, const char *imsi)
void test_no_authen_imeisv()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
/* No auth only works on GERAN */
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
net->vlr->cfg.retrieve_imeisv_early = true;
@ -580,16 +585,17 @@ void test_no_authen_imeisv(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_no_authen_imeisv_imei(uint8_t nr, const char *imsi)
void test_no_authen_imeisv_imei()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
net->vlr->cfg.retrieve_imeisv_early = true;
net->vlr->cfg.check_imei_rqd = true;
@ -657,16 +663,17 @@ void test_no_authen_imeisv_imei(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_no_authen_imeisv_tmsi(uint8_t nr, const char *imsi)
void test_no_authen_imeisv_tmsi()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
net->vlr->cfg.retrieve_imeisv_early = true;
net->vlr->cfg.assign_tmsi = true;
@ -794,16 +801,17 @@ void test_no_authen_imeisv_tmsi(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}
void test_no_authen_imeisv_tmsi_imei(uint8_t nr, const char *imsi)
void test_no_authen_imeisv_tmsi_imei()
{
struct vlr_subscr *vsub;
const char *imsi = "901700000004620";
rx_from_ran = RAN_GERAN_A;
comment_start(nr, imsi);
comment_start();
net->vlr->cfg.retrieve_imeisv_early = true;
net->vlr->cfg.assign_tmsi = true;
@ -883,7 +891,7 @@ void test_no_authen_imeisv_tmsi_imei(uint8_t nr, const char *imsi)
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end(nr, imsi);
comment_end();
}

View File

@ -1,4 +1,4 @@
===== [1] test_no_authen(901700000004620)...
===== test_no_authen
- Location Update request causes a GSUP LU request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -317,12 +317,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [1] test_no_authen(901700000004620): SUCCESS
===== test_no_authen: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [2] test_no_authen_tmsi(901700000004620)...
===== test_no_authen_tmsi
- Location Update request causes a GSUP LU request to HLR
MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST
new conn
@ -828,12 +828,12 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0)
DRLL Freeing subscriber connection with NULL subscriber
bssap_clear_sent == 1
llist_count(&net->subscr_conns) == 0
===== [2] test_no_authen_tmsi(901700000004620): SUCCESS
===== test_no_authen_tmsi: SUCCESS
full talloc report on 'msgb' (total 0 bytes in 1 blocks)
talloc_total_blocks(tall_bsc_ctx) == 7
===== [3] test_no_authen_imei(901700000004620)...