There is currently no indication that a test has crashed. Instead, the output just stops and the test configuration is marked failed. This makes debugging test failures difficult and time consuming, because there isn't any useful logging to start with.
[1.345200 hash done e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855]
[1.345200 ms-bma255: MS Done Init type:0x0 range:2]
[1.346300 mux config:0, port:1, rv:8]
[1.346300 C1: ErrorRecovery]
[1.348500 C1: retimer power enable success]
[1.348500 ppc p1 init'd.]
[1.348500 C1: TCPC init ready]
[1.348500 C1: PE_SNK_Startup]
[1.359500 ms-bmi160-accel: MS Done Init type:0x0 range:4]
[1.359500 ms-bma255 ODR: 10000 - roundup 0 from config 3 [AP 0]: 0]
[[[... test SEGFAULT'ed here, but no output/error message ...]]]
INFO - /mnt/host/source/src/platform/ec/twister-out/native_posix/drivers/drivers.default.console_cmds/handler.log
INFO - 1 test scenarios (1 test instances) selected, 0 configurations skipped (0 by static filter, 0 at runtime).
INFO - 0 of 1 test configurations passed (0.00%), 1 failed, 0 errored, 0 skipped with 0 warnings in 10.18 seconds
INFO - In total 29 test cases were executed, 0 skipped on 1 out of total 563 platforms (0.18%)
INFO - 1 test configurations executed on platforms, 0 test configurations were only built.
INFO - Saving reports...
INFO - Writing JSON report /mnt/host/source/src/platform/ec/twister-out/twister.json
INFO - Writing xunit report /mnt/host/source/src/platform/ec/twister-out/twister.xml...
INFO - Writing xunit report /mnt/host/source/src/platform/ec/twister-out/twister_report.xml...
This is the same test run in gdb, which shows the crash:
[1.345200 hash done e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855]
[1.345200 ms-bma255: MS Done Init type:0x0 range:2]
[1.346300 mux config:0, port:1, rv:8]
[1.346300 C1: ErrorRecovery]
[1.348500 C1: retimer power enable success]
[1.348500 ppc p1 init'd.]
[1.348500 C1: TCPC init ready]
[1.348500 C1: PE_SNK_Startup]
[1.359500 ms-bmi160-accel: MS Done Init type:0x0 range:4]
[1.359500 ms-bma255 ODR: 10000 - roundup 0 from config 3 [AP 0]: 0]
Thread 11 "zephyr.elf" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf39fbac0 (LWP 1801698)]
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x080522e1 in body_detect_reset () at /home/timvp/chromiumos/src/platform/ec/common/body_detection.c:191
#2 0x08065f86 in motion_sense_set_data_rate (sensor=<optimized out>) at /home/timvp/chromiumos/src/platform/ec/common/motion_sense.c:210
#3 0x080668c4 in motion_sense_process (sensor=0x80f7700 <motion_sensors>, event=<optimized out>, ts=<optimized out>) at /home/timvp/chromiumos/src/platform/ec/common/motion_sense.c:678
#4 motion_sense_task (u=<optimized out>) at /home/timvp/chromiumos/src/platform/ec/common/motion_sense.c:826
#5 0x080a37c3 in z_thread_entry (entry=<optimized out>, p1=<optimized out>, p2=<optimized out>, p3=<optimized out>) at /home/timvp/chromiumos/src/third_party/zephyr/main/lib/os/thread_entry.c:36
#6 0x080ac957 in posix_thread_starter (arg=0x8) at /home/timvp/chromiumos/src/third_party/zephyr/main/arch/posix/core/posix_core.c:305
#7 0xf7e1c7b1 in start_thread () from /lib32/libc.so.6
#8 0x00000008 in ?? ()
#9 0xf39fbb30 in ?? ()
#10 0xf7eb1156 in clone () from /lib32/libc.so.6
twister should at least indicate that the test crashed, and what the error code was (e.g., SIGSEGV, Segmentation fault). Even better would be outputting a backtrace when a crash occurs.
There is currently no indication that a test has crashed. Instead, the output just stops and the test configuration is marked failed. This makes debugging test failures difficult and time consuming, because there isn't any useful logging to start with.
This is the same test run in
gdb
, which shows the crash:twister
should at least indicate that the test crashed, and what the error code was (e.g.,SIGSEGV, Segmentation fault
). Even better would be outputting a backtrace when a crash occurs.