zephyr/tests/kernel/fifo/fifo_api/src/main.c
Andy Ross d1200d2155 tests: Never disable SMP
Disabling SMP mode for certain tests was a one-release thing, done to
avoid having to triage every test independently (MANY are not
SMP-safe), and with the knowledge that it was probably hiding bugs in
the kernel.

Turn it on pervasively.  Tests are treated with a combination of
flagging specific cases as "1cpu" where we have short-running tests
that can be independently run in an otherwise SMP environment, and via
setting CONFIG_MP_NUM_CPUS=1 where that's not possible (which still
runs the full SMP kernel config, but with only one CPU available).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-26 16:54:06 -04:00

47 lines
1.2 KiB
C

/*
* Copyright (c) 2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @brief Tests for the FIFO kernel object
*
* Verify zephyr fifo apis under different context
*
* - API coverage
* -# k_fifo_init K_FIFO_DEFINE
* -# k_fifo_put k_fifo_put_list k_fifo_put_slist
* -# k_fifo_get *
*
* @defgroup kernel_fifo_tests FIFOs
* @ingroup all_tests
* @{
* @}
*/
#include <ztest.h>
extern void test_fifo_thread2thread(void);
extern void test_fifo_thread2isr(void);
extern void test_fifo_isr2thread(void);
extern void test_fifo_get_fail(void);
extern void test_fifo_loop(void);
extern void test_fifo_cancel_wait(void);
extern void test_fifo_is_empty_thread(void);
extern void test_fifo_is_empty_isr(void);
/*test case main entry*/
void test_main(void)
{
ztest_test_suite(fifo_api,
ztest_1cpu_unit_test(test_fifo_thread2thread),
ztest_unit_test(test_fifo_thread2isr),
ztest_unit_test(test_fifo_isr2thread),
ztest_unit_test(test_fifo_get_fail),
ztest_1cpu_unit_test(test_fifo_loop),
ztest_1cpu_unit_test(test_fifo_cancel_wait),
ztest_unit_test(test_fifo_is_empty_thread),
ztest_unit_test(test_fifo_is_empty_isr));
ztest_run_test_suite(fifo_api);
}