svm: use default SVM address in fifo unit tests 13/28313/1
authorBenoît Ganne <bganne@cisco.com>
Fri, 7 Feb 2020 10:59:32 +0000 (11:59 +0100)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 12 Aug 2020 15:59:46 +0000 (15:59 +0000)
Using random addresses can confuse AddressSanitizer

Type: fix

Change-Id: I44368093f899672ac4d511cc5a01ed87c988e63a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit dc90c719bca27856101f758939dcfb0b67124775)

src/plugins/unittest/svm_fifo_test.c

index a715fa2..5a17f88 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include <svm/svm_fifo.h>
 #include <vlib/vlib.h>
+#include <svm/svm_common.h>
 #include <svm/fifo_segment.h>
 
 #define SFIFO_TEST_I(_cond, _comment, _args...)                        \
@@ -2627,7 +2628,7 @@ sfifo_test_fifo_segment (vlib_main_t * vm, unformat_input_t * input)
 {
   int rv, verbose = 0;
 
-  fifo_segment_main_init (&segment_main, 3ULL << 30, 5);
+  fifo_segment_main_init (&segment_main, HIGH_SEGMENT_BASEVA, 5);
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "verbose"))