1 /*
2  * Copyright (c) 2016 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @defgroup kernel_pipe_tests PIPEs
9  * @ingroup all_tests
10  * @{
11  * @}
12  */
13 
14 #include <zephyr/ztest.h>
15 
16 /* k objects */
17 extern struct k_pipe pipe, kpipe, khalfpipe, put_get_pipe;
18 extern struct k_sem end_sema;
19 extern struct k_stack tstack;
20 extern struct k_thread tdata;
21 extern struct k_heap test_pool;
22 
pipe_api_setup(void)23 static void *pipe_api_setup(void)
24 {
25 	k_thread_access_grant(k_current_get(), &pipe,
26 			      &kpipe, &end_sema, &tdata, &tstack,
27 			      &khalfpipe, &put_get_pipe);
28 
29 	k_thread_heap_assign(k_current_get(), &test_pool);
30 
31 	return NULL;
32 }
33 
34 ZTEST_SUITE(pipe_api, NULL, pipe_api_setup, NULL, NULL, NULL);
35 
36 ZTEST_SUITE(pipe_api_1cpu, NULL, pipe_api_setup,
37 		ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL);
38