X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_malloc.c;h=ee34ca3bed059c4e3fb37abc6ef6682cccc0fb77;hb=9aaccf1abdb2894ec23870e1d2199a657f85850e;hp=bf27effed9cf533a38b964f14715c2de019c774c;hpb=495ea3d9c600e072735c7802f2dda4eb9295c061;p=dpdk.git diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index bf27effed9..ee34ca3bed 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -486,7 +486,7 @@ test_realloc(void) printf("NULL pointer returned from rte_zmalloc\n"); return -1; } - rte_snprintf(ptr1, size1, "%s" ,hello_str); + snprintf(ptr1, size1, "%s" ,hello_str); char *ptr2 = rte_realloc(ptr1, size2, CACHE_LINE_SIZE); if (!ptr2){ rte_free(ptr1); @@ -924,7 +924,7 @@ test_alloc_socket(void) return 0; } -int +static int test_malloc(void) { unsigned lcore_id; @@ -1045,3 +1045,9 @@ test_malloc(void) return 0; } + +static struct test_command malloc_cmd = { + .command = "malloc_autotest", + .callback = test_malloc, +}; +REGISTER_TEST_COMMAND(malloc_cmd);