From 890f346808cd5bb94cd2c8fd66562d85d72b3cc4 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 27 Mar 2020 10:54:19 +0100 Subject: [PATCH] pdcp: fixing LTE rx test the test was introducing two lost SN and the number of expected SDUs wasn't changed. Changed now counters, etc to only drop one SN. --- lib/test/upper/pdcp_lte_test_rx.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/test/upper/pdcp_lte_test_rx.cc b/lib/test/upper/pdcp_lte_test_rx.cc index 09643f998..74a61f6b1 100644 --- a/lib/test/upper/pdcp_lte_test_rx.cc +++ b/lib/test/upper/pdcp_lte_test_rx.cc @@ -132,26 +132,26 @@ int test_rx_all(srslte::byte_buffer_pool* pool, srslte::log_ref log) /* * RX Test 3: PDCP LTE Entity with SN LEN = 12 - * Test reception of a dublicate PDU, the duplicate should just be dropped. + * Test reception of a dublicate SN, the duplicate should just be dropped. */ { std::vector test_counts(2); // Test two packets - std::iota(test_counts.begin(), test_counts.end(), 31); // Starting at COUNT 4095 + std::iota(test_counts.begin(), test_counts.end(), 31); // Starting at COUNT 31 std::vector test_pdus = gen_expected_pdus_vector( tst_sdu1, test_counts, srslte::PDCP_SN_LEN_12, srslte::PDCP_RB_IS_DRB, sec_cfg, pool, log); pdcp_lte_initial_state test_init_state = { - .tx_count = 0, .rx_hfn = 0, .next_pdcp_rx_sn = 33, .last_submitted_pdcp_rx_sn = 32}; + .tx_count = 0, .rx_hfn = 0, .next_pdcp_rx_sn = 32, .last_submitted_pdcp_rx_sn = 31}; TESTASSERT(test_rx(std::move(test_pdus), test_init_state, srslte::PDCP_SN_LEN_12, srslte::PDCP_RB_IS_DRB, - 2, + test_counts.size() - 1, tst_sdu1, pool, log) == 0); } - return 0; + return SRSLTE_SUCCESS; } // Setup all tests