#include <sys/wait.h>
#include <sys/file.h>
#include <limits.h>
+#include <fcntl.h>
#include <rte_per_lcore.h>
#include <rte_debug.h>
return result;
}
-#ifdef RTE_EXEC_ENV_LINUXAPP
+#ifdef RTE_EXEC_ENV_LINUX
/*
* count the number of "node*" files in /sys/devices/system/node/
*/
test_whitelist_flag(void)
{
unsigned i;
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point */
const char * prefix = "";
#else
static int
test_invalid_b_flag(void)
{
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point */
const char * prefix = "";
#else
static int
test_invalid_vdev_flag(void)
{
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point, and we also need to
* run another primary process here */
const char * prefix = no_shconf;
static int
test_invalid_r_flag(void)
{
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point */
const char * prefix = "";
#else
static int
test_missing_c_flag(void)
{
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point */
const char * prefix = "";
#else
static int
test_master_lcore_flag(void)
{
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point */
const char *prefix = "";
#else
static int
test_invalid_n_flag(void)
{
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point */
const char * prefix = "";
#else
{
char prefix[PATH_MAX] = "";
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
return 0;
#else
char tmp[PATH_MAX];
static int
test_no_huge_flag(void)
{
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point, and we also need to
* run another primary process here */
const char * prefix = no_shconf;
printf("Error - process did not run ok with --no-huge and -m flags\n");
return -1;
}
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target does not support NUMA, hence no --socket-mem tests */
return 0;
#endif
test_misc_flags(void)
{
char hugepath[PATH_MAX] = {0};
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point */
const char * prefix = "";
const char * nosh_prefix = "";
return -1;
}
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* no more tests to be done on FreeBSD */
return 0;
#endif
*/
char prefix[PATH_MAX] = "";
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
return 0;
#else
if (get_current_prefix(prefix, sizeof(prefix)) == NULL) {
static int
test_memory_flags(void)
{
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD target doesn't support prefixes at this point */
const char * prefix = "";
#else
char invalid_socket_mem[SOCKET_MEM_STRLEN];
char buf[SOCKET_MEM_STRLEN]; /* to avoid copying string onto itself */
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
int i, num_sockets = 1;
#else
int i, num_sockets = RTE_MIN(get_number_of_sockets(),
return -1;
}
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
/* no other tests are applicable to BSD */
return 0;
#endif