tests: posix: use consistent min stack sizes
* Use PTHREAD_STACK_MIN as provided by the specification instead of a hard-coded value of 1024 * add extra stack size to semaphore tests Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
parent
ecda72079e
commit
746a3b943d
@ -11,7 +11,7 @@
|
||||
|
||||
#define N_THR 2
|
||||
#define N_KEY 2
|
||||
#define STACKSZ (1024 + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
#define STACKSZ (MAX(1024, PTHREAD_STACK_MIN) + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
#define BUFFSZ 48
|
||||
|
||||
K_THREAD_STACK_ARRAY_DEFINE(stackp, N_THR, STACKSZ);
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
#define N_THR 2
|
||||
#define STACKSZ (1024 + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
#define STACKSZ (MAX(1024, PTHREAD_STACK_MIN) + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
#define SENDER_THREAD 0
|
||||
#define RECEIVER_THREAD 1
|
||||
#define MESSAGE_SIZE 16
|
||||
|
||||
@ -7,9 +7,10 @@
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <zephyr/sys/util.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
#define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
#define STACK_SIZE (MAX(1024, PTHREAD_STACK_MIN) + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
|
||||
static K_THREAD_STACK_DEFINE(stack, STACK_SIZE);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define N_THR_E 3
|
||||
#define N_THR_T 4
|
||||
#define BOUNCES 64
|
||||
#define STACKS (1024 + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
#define STACKS (MAX(1024, PTHREAD_STACK_MIN) + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
#define THREAD_PRIORITY 3
|
||||
#define ONE_SECOND 1
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
#define N_THR 3
|
||||
#define STACKSZ (1024 + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
#define STACKSZ (MAX(1024, PTHREAD_STACK_MIN) + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
|
||||
K_THREAD_STACK_ARRAY_DEFINE(stack, N_THR, STACKSZ);
|
||||
pthread_rwlock_t rwlock;
|
||||
|
||||
@ -8,9 +8,10 @@
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#include <zephyr/sys/util.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
#define STACK_SIZE 1024
|
||||
#define STACK_SIZE (MAX(1024, PTHREAD_STACK_MIN) + CONFIG_TEST_EXTRA_STACK_SIZE)
|
||||
|
||||
sem_t sema;
|
||||
void *dummy_sem;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user