From e10e372e5a7a1be385e77a8062a2573eb58b29d8 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 13 Apr 2016 00:05:27 +0200 Subject: Fix vppinfra unit tests "make check" in build-root/build-$tag-$arch/vppinfra should now work on a machine with 3G of spare memory Change-Id: Ie6a22e8496b56b93aa90fdc81e3e0c10dc7514fb Signed-off-by: Florin Coras --- vppinfra/vppinfra/test_elf.c | 7 +++++-- vppinfra/vppinfra/test_random.c | 4 +++- vppinfra/vppinfra/test_slist.c | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/vppinfra/vppinfra/test_elf.c b/vppinfra/vppinfra/test_elf.c index d3145b63..914513ab 100644 --- a/vppinfra/vppinfra/test_elf.c +++ b/vppinfra/vppinfra/test_elf.c @@ -166,8 +166,11 @@ int main (int argc, char * argv[]) } } - if (! tm->input_file) - clib_error ("no input file"); + if (!tm->input_file) + { + clib_warning("No input file! Using test_bihash_template"); + tm->input_file = "test_bihash_template"; + } error = elf_read_file (em, tm->input_file); if (error) diff --git a/vppinfra/vppinfra/test_random.c b/vppinfra/vppinfra/test_random.c index f54e0c1e..9cf07264 100644 --- a/vppinfra/vppinfra/test_random.c +++ b/vppinfra/vppinfra/test_random.c @@ -54,7 +54,7 @@ int test_random_main (unformat_input_t * input) uword print; u32 seed; u32 *seedp = &seed; - + /* first, check known sequence from Numerical Recipes in C, 2nd ed. page 284 */ seed = known_random_sequence[0]; @@ -127,6 +127,8 @@ int main (int argc, char * argv[]) unformat_input_t i; int ret; + clib_mem_init (0, 3ULL<<30); + unformat_init_command_line (&i, argv); ret = test_random_main (&i); unformat_free (&i); diff --git a/vppinfra/vppinfra/test_slist.c b/vppinfra/vppinfra/test_slist.c index 76ba5dc5..7a021532 100644 --- a/vppinfra/vppinfra/test_slist.c +++ b/vppinfra/vppinfra/test_slist.c @@ -158,7 +158,7 @@ int test_slist_main (unformat_input_t *input) u32 tmp; tm->seed = 0xbabeb00b; - tm->iter = 10000000; + tm->iter = 100000; tm->verbose = 1; tm->branching_factor = 1.0 / 5.0; @@ -200,7 +200,7 @@ int main (int argc, char * argv[]) unformat_input_t i; int ret; - clib_mem_init (0, (u64)8<<30); + clib_mem_init (0, (u64)4<<30); unformat_init_command_line (&i, argv); ret = test_slist_main (&i); -- cgit 1.2.3-korg