zephyr/scripts/pylib/twister
Eugeniy Paltsev 79b3a50772 twister: BinaryHandler: call try_kill_process_by_pid in a 'with' scope
The commit
531fe89e80 (sanitycheck: use multiprcoessing instead of threads)
introduce regression for ARC nsim_hs_smp platform.

The regression is that verification on nsim_hs_smp hangs. That
happens because now we don't call try_kill_process_by_pid()
in the 'with' scope of the 'subprocess.Popen' when we spawning
BinaryHandler thread. Previously it was called via `terminate`
method of `BinaryHandler` but it was changed in 531fe89e80.
So if we can't terminate the simulator in a normal way
(which is expected for 'mdb' which is used for nsim_hs_smp
simulation) we will hang forever - we will never return from
'with' scope of the 'subprocess.Popen' as we are waiting for
process termination but the try_kill_process_by_pid() is located
latter and we never reach it.

Fix that.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2021-01-10 15:42:48 -05:00
..
boards/unit/unit_testing sanitycheck: move sanity_chk -> pylib/twister 2020-12-11 14:13:02 -05:00
expr_parser.py sanitycheck: move sanity_chk -> pylib/twister 2020-12-11 14:13:02 -05:00
harness.py sanitycheck: move sanity_chk -> pylib/twister 2020-12-11 14:13:02 -05:00
scl.py twister: remove some leftover sanitycheck mentions 2020-12-14 14:13:16 -05:00
twisterlib.py twister: BinaryHandler: call try_kill_process_by_pid in a 'with' scope 2021-01-10 15:42:48 -05:00