tests: No thread-shared/synchronized data on stack (coherence)
CONFIG_KERNEL_COHERENCE forbids synchronized data on the stack: no spinlocks, IPC primitives, or things that contain them. Application code obviously doesn't have to follow these inconvenient rules, but our test code needs to run on platforms with incoherent stack memory. Make these things static. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
f5267d9ff2
commit
589c781506
4 changed files with 7 additions and 7 deletions
|
@ -144,7 +144,7 @@ void test_spinlock_bounce(void)
|
|||
void test_spinlock_mutual_exclusion(void)
|
||||
{
|
||||
k_spinlock_key_t key;
|
||||
struct k_spinlock lock_runtime;
|
||||
static struct k_spinlock lock_runtime;
|
||||
unsigned int irq_key;
|
||||
|
||||
(void)memset(&lock_runtime, 0, sizeof(lock_runtime));
|
||||
|
|
|
@ -1054,7 +1054,7 @@ static void test_cancel_or_release(void)
|
|||
|
||||
static void test_sync_basic(void)
|
||||
{
|
||||
struct onoff_sync_service srv = {};
|
||||
static struct onoff_sync_service srv = {};
|
||||
k_spinlock_key_t key;
|
||||
int res = 5;
|
||||
int rc;
|
||||
|
@ -1131,7 +1131,7 @@ static void test_sync_basic(void)
|
|||
|
||||
static void test_sync_error(void)
|
||||
{
|
||||
struct onoff_sync_service srv = {};
|
||||
static struct onoff_sync_service srv = {};
|
||||
k_spinlock_key_t key;
|
||||
int res = -EPERM;
|
||||
int rc;
|
||||
|
|
|
@ -845,7 +845,7 @@ void test_ringbuffer_equal_bufs(void)
|
|||
void test_ringbuffer_performance(void)
|
||||
{
|
||||
uint8_t buf[16];
|
||||
struct ring_buf rbuf;
|
||||
static struct ring_buf rbuf;
|
||||
uint8_t indata[16];
|
||||
uint8_t outdata[16];
|
||||
uint8_t *ptr;
|
||||
|
|
|
@ -121,7 +121,7 @@ static void test_net_buf_1(void)
|
|||
static void test_net_buf_2(void)
|
||||
{
|
||||
struct net_buf *frag, *head;
|
||||
struct k_fifo fifo;
|
||||
static struct k_fifo fifo;
|
||||
int i;
|
||||
|
||||
head = net_buf_alloc_len(&bufs_pool, 74, K_NO_WAIT);
|
||||
|
@ -169,8 +169,8 @@ static void test_net_buf_3(void)
|
|||
{
|
||||
static struct k_thread test_3_thread_data;
|
||||
struct net_buf *frag, *head;
|
||||
struct k_fifo fifo;
|
||||
struct k_sem sema;
|
||||
static struct k_fifo fifo;
|
||||
static struct k_sem sema;
|
||||
int i;
|
||||
|
||||
head = net_buf_alloc_len(&bufs_pool, 74, K_NO_WAIT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue