#ifndef _CMDLINE_TEST_H_
#define _CMDLINE_TEST_H_
-/* icc on baremetal gives us troubles with function named 'main' */
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-#endif
-
extern cmdline_parse_ctx_t main_ctx[];
-int main(int argc, char **argv);
-
#endif
#include <rte_branch_prediction.h>
#include <rte_string_fns.h>
-#include "main.h"
-
int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
{
int ret;
int i;
+++ /dev/null
-/*-
- * BSD LICENSE
- *
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Intel Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _MAIN_H_
-#define _MAIN_H_
-
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
-int MAIN(int argc, char **argv);
-
-#endif /* _MAIN_H_ */
#endif /*RTE_LIBRTE_ACL_STANDALONE */
-#include "main.h"
+#define RTE_LOGTYPE_TESTACL RTE_LOGTYPE_USER1
+
+#define APP_NAME "TESTACL"
#define GET_CB_FIELD(in, fd, base, lim, dlm) do { \
unsigned long val; \
}
int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
{
int ret;
uint32_t lcore;
+++ /dev/null
-/*-
- * BSD LICENSE
- *
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Intel Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _MAIN_H_
-#define _MAIN_H_
-
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
-#define RTE_LOGTYPE_TESTACL RTE_LOGTYPE_USER1
-
-#define APP_NAME "TESTACL"
-
-
-int MAIN(int argc, char **argv);
-
-#endif /* _MAIN_H_ */
#include "main.h"
int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
{
uint32_t lcore;
int ret;
#define APP_FLUSH 0x3FF
#endif
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
-int MAIN(int argc, char **argv);
-
#endif /* _MAIN_H_ */
" statistics.\n\n"
"quit\n"
- " Quit to prompt in Linux and reboot on Baremetal.\n\n"
+ " Quit to prompt.\n\n"
);
}
return 0;
}
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-#endif
-
int
main(int argc, char** argv)
{
#ifndef _TESTPMD_H_
#define _TESTPMD_H_
-/* icc on baremetal gives us troubles with function named 'main' */
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-int main(int argc, char **argv);
-#endif
-
#define RTE_PORT_ALL (~(portid_t)0x0)
#define RTE_TEST_RX_DESC_MAX 2048
SRCS-y += test_tailq.c
SRCS-y += test_string_fns.c
SRCS-y += test_cpuflags.c
-
-ifeq ($(CONFIG_RTE_EXEC_ENV_BAREMETAL),)
SRCS-y += test_mp_secondary.c
SRCS-y += test_eal_flags.c
SRCS-y += test_eal_fs.c
-endif
-
SRCS-y += test_alarm.c
SRCS-y += test_interrupts.c
SRCS-y += test_version.c
else:
test_whitelist = testlist
-# adjust test command line
-if "baremetal" in target:
- cmdline = "qemu-system-x86_64 -cdrom %s.iso -boot d " % (sys.argv[1])
- cmdline += "-m 2000 -smp 4 -nographic -net nic,model=e1000"
- platform = "QEMU x86_64"
-else:
- cmdline = "%s -c f -n 4"%(sys.argv[1])
+cmdline = "%s -c f -n 4"%(sys.argv[1])
print cmdline
def __get_cmdline(self, test):
cmdline = self.cmdline
- # perform additional linuxapp adjustments
- if not "baremetal" in self.target:
-
- # append memory limitations for each test
- # otherwise tests won't run in parallel
- if not "i686" in self.target:
- cmdline += " --socket-mem=%s"% test["Memory"]
- else:
- # affinitize startup so that tests don't fail on i686
- cmdline = "taskset 1 " + cmdline
- cmdline += " -m " + str(sum(map(int,test["Memory"].split(","))))
+ # append memory limitations for each test
+ # otherwise tests won't run in parallel
+ if not "i686" in self.target:
+ cmdline += " --socket-mem=%s"% test["Memory"]
+ else:
+ # affinitize startup so that tests don't fail on i686
+ cmdline = "taskset 1 " + cmdline
+ cmdline += " -m " + str(sum(map(int,test["Memory"].split(","))))
- # set group prefix for autotest group
- # otherwise they won't run in parallel
- cmdline += " --file-prefix=%s"% test["Prefix"]
+ # set group prefix for autotest group
+ # otherwise they won't run in parallel
+ cmdline += " --file-prefix=%s"% test["Prefix"]
- return cmdline
return cmdline
self.__filter_groups(self.non_parallel_test_groups)
# create a pool of worker threads
- if not "baremetal" in self.target:
- pool = multiprocessing.Pool(processes=1)
- else:
- # we can't be sure running baremetal tests in parallel
- # will work, so let's stay on the safe side
- pool = multiprocessing.Pool(processes=1)
+ pool = multiprocessing.Pool(processes=1)
results = []
#ifndef _PROCESS_H_
#define _PROCESS_H_
-#ifndef RTE_EXEC_ENV_BAREMETAL
-
#ifdef RTE_EXEC_ENV_BSDAPP
#define self "curproc"
#define exe "file"
return status;
}
-#endif /* not baremetal */
-
#endif /* _PROCESS_H_ */
const char *prgname; /* to be set to argv[0] */
-#ifndef RTE_EXEC_ENV_BAREMETAL
static const char *recursive_call; /* used in linuxapp for MP and other tests */
static int
printf("ERROR - missing action to take for %s\n", recursive_call);
return -1;
}
-#endif
int
main(int argc, char **argv)
prgname = argv[0];
-#ifndef RTE_EXEC_ENV_BAREMETAL
if ((recursive_call = getenv(RECURSIVE_ENV_VAR)) != NULL)
return do_recursive_call();
-#endif
#ifdef RTE_LIBEAL_USE_HPET
if (rte_eal_hpet_init(1) < 0)
int unit_test_suite_runner(struct unit_test_suite *suite);
-/* icc on baremetal gives us troubles with function named 'main' */
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-#endif
-
#define RECURSIVE_ENV_VAR "RTE_TEST_RECURSIVE"
#include <cmdline_parse.h>
int commands_init(void);
-int main(int argc, char **argv);
-
int test_pci(void);
int test_pci_run;
/*
* Debug test
* ==========
- *
- * - Call rte_dump_stack() and rte_dump_registers(). The result is not checked
- * currently, as the functions are not implemented on baremetal.
- * - Check that rte_panic() terminates the program using a non-zero error code.
- * (Only implemented on linux, since it requires the fork() system call)
*/
-#ifdef RTE_EXEC_ENV_BAREMETAL
-
-/* baremetal - don't test rte_panic or rte_exit */
-static int
-test_panic(void)
-{
- return 0;
-}
-
-static int
-test_exit(void)
-{
- return 0;
-}
-
-#else
-
-/* linuxapp - use fork() to test rte_panic() */
+/* use fork() to test rte_panic() */
static int
test_panic(void)
{
return 0;
}
-/* linuxapp - use fork() to test rte_exit() */
+/* use fork() to test rte_exit() */
static int
test_exit_val(int exit_val)
{
return 0;
}
-#endif
-
static void
dummy_app_usage(const char *progname)
{
}
#else
-/* to be implemented for baremetal later */
+/* to be implemented for bsd later */
static inline int
test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
{
return (0);
}
-#ifdef RTE_EXEC_ENV_BAREMETAL
-
-/* baremetal - don't test failing sanity checks */
-static int
-test_failing_mbuf_sanity_check(void)
-{
- return 0;
-}
-
-#else
-
#include <unistd.h>
#include <sys/wait.h>
-/* linuxapp - use fork() to test mbuf errors panic */
+/* use fork() to test mbuf errors panic */
static int
verify_mbuf_check_panics(struct rte_mbuf *buf)
{
return 0;
}
-#endif
static int