zephyr/tests/kernel/queue/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

52 lines
1.1 KiB
C

/*
* Copyright (c) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <ztest.h>
#include "test_queue.h"
#ifndef CONFIG_USERSPACE
static void test_queue_supv_to_user(void)
{
ztest_test_skip();
}
static void test_auto_free(void)
{
ztest_test_skip();
}
static void test_queue_alloc_prepend_user(void)
{
ztest_test_skip();
}
static void test_queue_alloc_append_user(void)
{
ztest_test_skip();
}
#endif
K_MEM_POOL_DEFINE(test_pool, 16, 96, 4, 4);
/*test case main entry*/
void test_main(void)
{
k_thread_resource_pool_assign(k_current_get(), &test_pool);
ztest_test_suite(queue_api,
ztest_unit_test(test_queue_supv_to_user),
ztest_user_unit_test(test_queue_alloc_prepend_user),
ztest_user_unit_test(test_queue_alloc_append_user),
ztest_unit_test(test_auto_free),
ztest_1cpu_unit_test(test_queue_thread2thread),
ztest_unit_test(test_queue_thread2isr),
ztest_unit_test(test_queue_isr2thread),
ztest_1cpu_unit_test(test_queue_get_2threads),
ztest_1cpu_unit_test(test_queue_get_fail),
ztest_1cpu_unit_test(test_queue_loop),
ztest_unit_test(test_queue_alloc));
ztest_run_test_suite(queue_api);
}