Skip to content

Commit

Permalink
test/unit: assert on mbuf counters
Browse files Browse the repository at this point in the history
Signed-off-by: Yuanhan Liu <[email protected]>
  • Loading branch information
yuanhanliu committed Dec 26, 2023
1 parent b24d456 commit 3c9f05d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/unit/tcp_input_seq.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ static void test_tcp_seq(void)
do_test_tcp_seq(tsock, tsock->rcv_nxt - len + 1, len, SEQ_GOOD);
do_test_tcp_seq(tsock, tsock->rcv_nxt + wnd - 1, len, SEQ_GOOD);
do_test_tcp_seq(tsock, tsock->rcv_nxt + wnd, len, SEQ_BAD);

ut_close(tsock, CLOSE_TYPE_RESET);
}

int main(int argc, char **argv)
Expand Down
4 changes: 4 additions & 0 deletions test/unit/test_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,10 @@ void ut_exit(void)
rte_atomic32_read(&nr_malloc));
assert(rte_atomic32_read(&nr_malloc) == 0);
assert(rss_after - ut_rss_before_testing < 100);

assert(worker->nr_ooo_mbuf == 0);
assert(worker->nr_write_mbuf == 0);
assert(worker->nr_in_process_mbuf == 0);
}

static void ut_dev_port_init(void)
Expand Down

0 comments on commit 3c9f05d

Please sign in to comment.