X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_eal_fs.c;h=1cbcb9d983af4476ef0a6edf085fe6b9a1461967;hb=34fcd34982377801accd6e64ccbd8952bfce40b8;hp=cc0afdf54990b37560c7bbef1f877958a1815fe2;hpb=3031749c2df04a63cdcef186dcce3781e61436e8;p=dpdk.git diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c index cc0afdf549..1cbcb9d983 100644 --- a/app/test/test_eal_fs.c +++ b/app/test/test_eal_fs.c @@ -32,14 +32,13 @@ */ #include "test.h" -#ifndef RTE_EXEC_ENV_BAREMETAL #include #include #include #include /* eal_filesystem.h is not a public header file, so use relative path */ -#include "../../lib/librte_eal/linuxapp/eal/include/eal_filesystem.h" +#include "../../lib/librte_eal/common/eal_filesystem.h" static int test_parse_sysfs_value(void) @@ -66,7 +65,7 @@ test_parse_sysfs_value(void) perror("mkstemp() failure"); goto error; } - rte_snprintf(proc_path, sizeof(proc_path), "/proc/self/fd/%d", tmp_file_handle); + snprintf(proc_path, sizeof(proc_path), "/proc/self/fd/%d", tmp_file_handle); if (readlink(proc_path, filename, sizeof(filename)) < 0) { perror("readlink() failure"); goto error; @@ -196,18 +195,16 @@ error: return -1; } -int +static int test_eal_fs(void) { if (test_parse_sysfs_value() < 0) return -1; return 0; } -#else -/* baremetal does not have a filesystem */ -int -test_eal_fs(void) -{ - return 0; -} -#endif + +static struct test_command eal_fs_cmd = { + .command = "eal_fs_autotest", + .callback = test_eal_fs, +}; +REGISTER_TEST_COMMAND(eal_fs_cmd);