zephyr/scripts
Marti Bolivar 5591ca2374 sanitycheck: various fixes for device testing
Device testing has various problems:

- the main thread doesn't halt the serial monitoring thread when an
  error occurs while flashing, meaning flash errors can look like
  timeouts

- serial_line is unbound if the ser.readline() call raises an
  exception, so the following "if serial_line" would raise NameError
  in that case

- the serial monitoring thread is not a daemon, so exceptions or
  errors in the handle() thread that cause thread exit will leave the
  process sitting around until the serial monitoring thread has a
  chance to exit

Fix these issues:

- Rewrite the serial monitoring thread as a select loop over the
  serial port file descriptor and a pipe shared by the main thread and
  serial monitoring thread. If flashing fails, the main thread uses
  the pipe to signal to the serial monitoring thread that it should
  exit.

- Make sure serial_line is always bound when read.

- Mark the serial thread daemonic.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-02-08 08:08:32 -05:00
..
checkpatch
ci ci: run_ci.sh: make script run locally 2019-02-01 19:04:55 -05:00
coccinelle
cross_compiler
dts scripts/dts: Rename get_key_value() to define_str() 2019-02-07 21:42:36 -06:00
footprint
gitlint
kconfig doc: Add KCONFIG_DOC_MODE env var handling 2019-02-01 10:16:06 -06:00
sanity_chk sanitycheck: Handle data over UART from gcov 2019-01-29 15:03:38 -05:00
support
west_commands scripts: bossac: Support flashing at an offset. 2019-02-07 15:13:11 -05:00
.gitignore
check_link_map.py
checkpatch.pl userspace: remove APPLICATION_MEMORY feature 2019-02-08 07:04:30 -05:00
checkstack.pl
coccicheck scripts: coccicheck: Add support for SPFLAGS 2019-02-07 08:12:20 -05:00
dir_is_writeable.py
elf_helper.py
file2hex.py
filter-known-issues.py
gen_app_partitions.py gen_app_partitions: add library support 2019-02-08 07:04:30 -05:00
gen_cfb_font_header.py
gen_gcov_files.py
gen_gdt.py
gen_idt.py
gen_kobject_list.py
gen_mmu_x86.py gen_mmu_x86: remove unused function 2019-02-06 14:34:20 -08:00
gen_offset_header.py
gen_priv_stacks.py
gen_relocate_app.py
gen_syscall_header.py
gen_syscalls.py
mergehex.py
parse_syscalls.py
process_gperf.py
qemu-machine-hack.py
requirements.txt
sanitycheck sanitycheck: various fixes for device testing 2019-02-08 08:08:32 -05:00
spelling.txt
subfolder_list.py
tags.sh
valgrind.supp
waitpid
west-commands.yml scripts: west_commands: add sign command 2019-02-07 08:44:19 -05:00