aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-04-13 00:05:27 +0200
committerGerrit Code Review <gerrit@fd.io>2016-04-14 14:09:49 +0000
commite10e372e5a7a1be385e77a8062a2573eb58b29d8 (patch)
tree31a4f0752232a07c201153a3525b349bdc1bd9ff
parenta991e50f7d60c4989755b84e2e1339679ea0b3ac (diff)
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 <fcoras@cisco.com>
-rw-r--r--vppinfra/vppinfra/test_elf.c7
-rw-r--r--vppinfra/vppinfra/test_random.c4
-rw-r--r--vppinfra/vppinfra/test_slist.c4
3 files changed, 10 insertions, 5 deletions
diff --git a/vppinfra/vppinfra/test_elf.c b/vppinfra/vppinfra/test_elf.c
index d3145b635da..914513abf90 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 f54e0c1e8c7..9cf07264449 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 76ba5dc59aa..7a021532530 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);