X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Funittest%2Fsvm_fifo_test.c;h=7221fb8345ec58c1c8c1c0b7e8edd6a7f267e61f;hb=8e755a16a71c55555f12381c8a12e22ae7138536;hp=16fcf8871f5dbf7002d3dd103c62851acc849e99;hpb=9e61d9a1aafbaecbc7b316fd94122b80c3f99905;p=vpp.git diff --git a/src/plugins/unittest/svm_fifo_test.c b/src/plugins/unittest/svm_fifo_test.c index 16fcf8871f5..7221fb8345e 100644 --- a/src/plugins/unittest/svm_fifo_test.c +++ b/src/plugins/unittest/svm_fifo_test.c @@ -2260,10 +2260,11 @@ sfifo_test_fifo_segment_fifo_grow (int verbose) /* * Allocate fifo and try to grow beyond available space */ - f = fifo_segment_alloc_fifo (fs, fifo_size, FIFO_SEGMENT_RX_FIFO); + f = fifo_segment_alloc_fifo (fs, fifo_segment_free_bytes (fs), + FIFO_SEGMENT_RX_FIFO); /* Try to force fifo growth */ - svm_fifo_set_size (f, svm_fifo_size (f) + n_free_chunk_bytes); + svm_fifo_set_size (f, svm_fifo_size (f) + n_free_chunk_bytes + 1); validate_test_and_buf_vecs (&test_data, &data_buf, svm_fifo_size (f)); rv = svm_fifo_enqueue (f, svm_fifo_size (f), test_data); @@ -2570,7 +2571,6 @@ sfifo_test_fifo_segment (vlib_main_t * vm, unformat_input_t * input) { int rv, verbose = 0; - fifo_segment_main_init (&segment_main, HIGH_SEGMENT_BASEVA, 5); while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "verbose")) @@ -2632,7 +2632,7 @@ svm_fifo_test (vlib_main_t * vm, unformat_input_t * input, int res = 0; char *str; - + fifo_segment_main_init (&segment_main, HIGH_SEGMENT_BASEVA << 3, 5); while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "fifo1"))