tile: fix build
[dpdk.git] / app / test / test_eal_fs.c
index cc0afdf..7897812 100644 (file)
  */
 
 #include "test.h"
-#ifndef RTE_EXEC_ENV_BAREMETAL
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 
 /* 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,12 @@ 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
+
+REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);