Unit Test Strategy

I think the problem is with main, which is a thread at the end of the day, not controlled by FreeRTOS, and has its signals not masked.
if you look at your main thread backtrace

Thread 1 (Thread 0x7ffff78d9740 (LWP 5580)):
#0  vPortSystemTickHandler (sig=14) at os/FreeRTOS/portable/ThirdParty/GCC/Posix/port.c:369
#1  
#2  0x00007ffff7ea03bf in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7fffffffde90, rem=rem@entry=0x7fffffffde90) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
#3  0x00007ffff7ea6047 in __GI___nanosleep (requested_time=requested_time@entry=0x7fffffffde90, remaining=remaining@entry=0x7fffffffde90) at nanosleep.c:27
#4  0x00007ffff7ea5f7e in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#5  0x00005555555d6de6 in main (argc=, argv=) at gtest/main_gtest.cpp:72

main should not be executing vPortSystemTickHandler .

So either call vTaskStartScheduler(); from main or mask its(main) signals as described in the documentation.

1 Like