From 2c1a46a2ddd306f0f6758d5d5af67534adf74c28 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 30 Sep 2018 15:48:46 +0200 Subject: paging_test: Fix AGCH/PCH split test for second half of 102 multiframe * we have to use modulo 51, not 50 * the check for FACCH/SCH has to be applied to to the fn % 51 result Change-Id: I540a7eeef3ea3ed7347f0f1b5a5a6fe7ce0ec8bb --- tests/paging/paging_test.c | 6 +++--- tests/paging/paging_test.ok | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'tests/paging') diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c index 1fc7d928..18708e24 100644 --- a/tests/paging/paging_test.c +++ b/tests/paging/paging_test.c @@ -136,7 +136,7 @@ static void test_is_ccch_for_agch(void) printf("Fn: AGCH: (bs_ag_blks_res=[0:7]\n"); for (fn = 0; fn < 102; fn++) { - + uint8_t fn51 = fn % 51; /* Note: the formula that computes the CCCH block number for a * given frame number is optimized to work on block boarders, * for frame numbers that do not fall at the beginning of the @@ -144,12 +144,12 @@ static void test_is_ccch_for_agch(void) * we only check with frame numbers that mark the beginning * of a new block. See also L1SAP_FN2CCCHBLOCK() in l1sap.h */ - if (fn % 10 != 2 && fn % 10 != 6) + if (fn51 % 10 != 2 && fn51 % 10 != 6) continue; printf("%03u: ", fn); - if (fn % 50 == 2) { + if (fn51 == 2) { printf(" . . . . . . . . (BCCH)\n"); continue; } diff --git a/tests/paging/paging_test.ok b/tests/paging/paging_test.ok index 50006ec9..927fdf92 100644 --- a/tests/paging/paging_test.ok +++ b/tests/paging/paging_test.ok @@ -11,14 +11,14 @@ Fn: AGCH: (bs_ag_blks_res=[0:7] 036: 0 0 0 0 0 0 0 1 042: 0 0 0 0 0 0 0 0 046: 0 0 0 0 0 0 0 0 -052: . . . . . . . . (BCCH) -056: 0 1 1 1 1 1 1 1 -062: 0 0 1 1 1 1 1 1 -066: 0 0 0 1 1 1 1 1 -072: 0 0 0 0 1 1 1 1 -076: 0 0 0 0 0 1 1 1 -082: 0 0 0 0 0 0 1 1 -086: 0 0 0 0 0 0 0 1 -092: 0 0 0 0 0 0 0 0 -096: 0 0 0 0 0 0 0 0 +053: . . . . . . . . (BCCH) +057: 0 1 1 1 1 1 1 1 +063: 0 0 1 1 1 1 1 1 +067: 0 0 0 1 1 1 1 1 +073: 0 0 0 0 1 1 1 1 +077: 0 0 0 0 0 1 1 1 +083: 0 0 0 0 0 0 1 1 +087: 0 0 0 0 0 0 0 1 +093: 0 0 0 0 0 0 0 0 +097: 0 0 0 0 0 0 0 0 Success -- cgit v1.2.3