Skip to content

Commit 9e4227e

Browse files
[nrf fromtree] tests: spi: loopback: use CONFIG_ZTEST_STACK_SIZE for thread stacks
The spi_loopback test suite creates three internal threads. The stack sizes for these threads is hardcoded to 512, which is to little for some socs, namely the nrf54h20 cpuapp if pm device runtime is enabled. Instead, determine the stack sizes the same way ztest stack sizes are determined. Signed-off-by: Bjarki Arge Andreasen <[email protected]> (cherry picked from commit 5163b8c)
1 parent 2ea472d commit 9e4227e

File tree

1 file changed

+2
-1
lines changed
  • tests/drivers/spi/spi_loopback/src

1 file changed

+2
-1
lines changed

tests/drivers/spi/spi_loopback/src/spi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,8 @@ ZTEST(spi_loopback, test_spi_word_size_32)
693693
sizeof(buffer_tx_32), &spec_copies[4], 32);
694694
}
695695

696-
static K_THREAD_STACK_DEFINE(thread_stack[3], 512);
696+
static K_THREAD_STACK_DEFINE(thread_stack[3], CONFIG_ZTEST_STACK_SIZE +
697+
CONFIG_TEST_EXTRA_STACK_SIZE);
697698
static struct k_thread thread[3];
698699

699700
static K_SEM_DEFINE(thread_sem, 0, 3);

0 commit comments

Comments
 (0)