Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions tests/kernel/spinlock/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void cpu1_fn(void *p1, void *p2, void *p3)
ARG_UNUSED(p2);
ARG_UNUSED(p3);

while (1) {
while (!bounce_done) {
bounce_once(4321, false);
}
}
Expand All @@ -138,6 +138,8 @@ ZTEST(spinlock, test_spinlock_bounce)
}

bounce_done = 1;

k_thread_join(&cpu1_thread, K_FOREVER);
}

/**
Expand Down Expand Up @@ -191,7 +193,7 @@ void trylock_fn(void *p1, void *p2, void *p3)
ARG_UNUSED(p2);
ARG_UNUSED(p3);

while (1) {
while (!bounce_done) {
bounce_once(4321, true);
}
}
Expand Down Expand Up @@ -219,8 +221,17 @@ ZTEST(spinlock, test_trylock)

bounce_done = 1;

k_thread_join(&cpu1_thread, K_FOREVER);

zassert_true(trylock_failures > 0);
zassert_true(trylock_successes > 0);
}

ZTEST_SUITE(spinlock, NULL, NULL, NULL, NULL, NULL);
static void before(void *ctx)
{
ARG_UNUSED(ctx);

bounce_done = 0;
}

ZTEST_SUITE(spinlock, NULL, NULL, before, NULL, NULL);
1 change: 1 addition & 0 deletions tests/net/lib/lwm2m/lwm2m_engine/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_ZTEST_STACK_SIZE=4096
CONFIG_MP_MAX_NUM_CPUS=1
1 change: 1 addition & 0 deletions tests/net/lib/lwm2m/lwm2m_rd_client/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_ZTEST_STACK_SIZE=4096
CONFIG_MP_MAX_NUM_CPUS=1
1 change: 1 addition & 0 deletions tests/posix/common/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_HEAP_MEM_POOL_SIZE=4096
CONFIG_MAX_THREAD_BYTES=4
CONFIG_THREAD_NAME=y
CONFIG_MAIN_STACK_SIZE=2048
2 changes: 0 additions & 2 deletions tests/posix/common/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ tests:
extra_configs:
- CONFIG_NEWLIB_LIBC=n
- CONFIG_THREAD_LOCAL_STORAGE=y
- CONFIG_MAIN_STACK_SIZE=1152
integration_platforms:
- qemu_x86
portability.posix.common.tls.newlib:
Expand All @@ -56,7 +55,6 @@ tests:
extra_configs:
- CONFIG_NEWLIB_LIBC=y
- CONFIG_THREAD_LOCAL_STORAGE=y
- CONFIG_MAIN_STACK_SIZE=1152
portability.posix.common.nsim:
platform_allow: nsim_sem_mpu_stack_guard
extra_configs:
Expand Down