1 /*
2 * Copyright (c) 2017 Wind River Systems, Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include <zephyr/ztest.h>
8
9 #ifdef CONFIG_64BIT
10 #define MAX_SZ 256
11 #else
12 #define MAX_SZ 128
13 #endif
14
15 K_HEAP_DEFINE(test_heap, MAX_SZ * 4);
16 extern void poll_test_grant_access(void);
17 extern void poll_fail_grant_access(void);
18
19 /*test case main entry*/
poll_setup(void)20 static void *poll_setup(void)
21 {
22 poll_test_grant_access();
23 poll_fail_grant_access();
24
25 k_thread_heap_assign(k_current_get(), &test_heap);
26
27 return NULL;
28 }
29
30 ZTEST_SUITE(poll_api, NULL, poll_setup, NULL, NULL, NULL);
31 ZTEST_SUITE(poll_api_1cpu, NULL, poll_setup, ztest_simple_1cpu_before,
32 ztest_simple_1cpu_after, NULL);
33