ARMmbed / htrun

MOVED: https://github.com/ARMmbed/mbed-os-tools (Flash, reset and run host supervised tests on mbed platforms)
8 stars 37 forks source link

"Found faulty sync in stream" -What am I doing wrong? #210

Closed Alex-EEE closed 6 years ago

Alex-EEE commented 6 years ago

When trying to use a custom host test, htrun is giving me a weird error "found faulty SYNC in stream". See full log at bottom.

I'm invoking like so: mbedhtrun --skip-flashing --skip-reset -p COM24:9600 -e host_tests -vv

It seems to find my custom host test: HOST: Inspecting 'C:\files\mbed\staging\framework\features\TESTS\host_tests' for local host tests... ("HOST: Loading module 'lwm2m.py': ", "<module 'lwm2m' from 'C:\files\mbed\staging\framework\features\TESTS\host_tests\lwm2m.pyc'>") HOST: Found host test implementation: <class 'lwm2m.Lwm2m'> -|> <class 'mbed_host_tests.host_tests.base_host_test.BaseHostTest'> HOST: Registering '<class 'lwm2m.Lwm2m'>' as 'lwm2m'

On the DUT, I'm using Greentea/htrun API exactly per instructions: GREENTEA_SETUP(120, "lwm2m");

If I switch back to using "default_auto": GREENTEA_SETUP(120, "default_auto");

...then my problem goes away. But then I can't use a custom host test.

What I'm I missing here? What extra step do I have to take to be able to use a custom host test?

Full trace: mbedhtrun --skip-flashing --skip-reset -p COM24:9600 -e host_tests -vv HOST: Inspecting 'C:\files\mbed\staging\framework\features\TESTS\host_tests' for local host tests... ("HOST: Loading module 'lwm2m.py': ", "<module 'lwm2m' from 'C:\files\mbed\staging\framework\features\TESTS\host_tests\lwm2m.pyc'>") HOST: Found host test implementation: <class 'lwm2m.Lwm2m'> -|> <class 'mbed_host_tests.host_tests.base_host_test.BaseHostTest'> HOST: Registering '<class 'lwm2m.Lwm2m'>' as 'lwm2m' [1534532650.58][CONN][INF] starting connection process... [1534532650.58][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling [1534532650.58][CONN][INF] initializing serial port listener... [1534532650.58][SERI][INF] serial(port=COM24, baudrate=9600, read_timeout=0.01, write_timeout=5) [1534532650.58][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed [1534532650.58][CONN][INF] sending up to 2 sync packets (specified with --sync=2) [1534532650.58][CONN][INF] sending preamble 'e31f3cd8-4c68-4289-8eed-04d7316af4cf' [1534532650.58][SERI][TXD] {{sync;e31f3cd8-4c68-4289-8eed-04d7316af4cf}} [1534532650.63][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed

[1534532650.68][CONN][ERR] found faulty SYNC in stream: {{sync;8c16e062-c065-4341-953c-da39bd5e6864}}, ignored... [1534532650.70][CONN][WRN] found KV pair in stream: {{version;1.3.0}}, ignoring... [1534532650.72][CONN][WRN] found KV pair in stream: {{timeout;120}}, ignoring... [1534532650.76][CONN][WRN] found KV pair in stream: {{host_test_name;lwm2m}}, ignoring... [1534532651.58][CONN][INF] resending new preamble '94577ddf-7c88-47f7-aeee-b3970d474112' after 1.00 sec [1534532651.58][SERI][TXD] {{__sync;94577ddf-7c88-47f7-aeee-b3970d474112}}

ciarmcom commented 6 years ago

ARM Internal Ref: MBOTRIAGE-1531

Alex-EEE commented 6 years ago

Arrrrrrgh, I was burning myself with my debugger and cutting off the serial responses. Sorry folks. Just in case anyone ever reads over this after its closed, here's what a good run looks like when it finds your custom host test:

$ mbedhtrun --skip-flashing --skip-reset -p COM24:9600 -e host_tests -vv HOST: Inspecting 'C:\files\mbed\staging\framework\features\TESTS\host_tests' for local host tests... ("HOST: Loading module 'lwm2m.py': ", "<module 'lwm2m' from 'C:\files\mbed\staging\framework\features\TESTS\host_tests\lwm2m.pyc'>") HOST: Found host test implementation: <class 'lwm2m.Lwm2m'> -|> <class 'mbed_host_tests.host_tests.base_host_test.BaseHostTest'> HOST: Registering '<class 'lwm2m.Lwm2m'>' as 'lwm2m' [1534539618.80][HTST][INF] host test executor ver. 1.2.0 [1534539618.80][HTST][INF] copy image onto target... SKIPPED! [1534539618.80][HTST][INF] starting host test process... [1534539619.23][CONN][INF] starting connection process... [1534539619.23][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling [1534539619.23][CONN][INF] initializing serial port listener... [1534539619.23][SERI][INF] serial(port=COM24, baudrate=9600, read_timeout=0.01, write_timeout=5) [1534539619.23][HTST][INF] setting timeout to: 60 sec [1534539619.23][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed [1534539619.23][CONN][INF] sending up to 2 sync packets (specified with --sync=2) [1534539619.23][CONN][INF] sending preamble 'd03817ac-a24e-45c9-87e3-9b4190b29cf1' [1534539619.23][SERI][TXD] {{sync;d03817ac-a24e-45c9-87e3-9b4190b29cf1}} [1534539619.37][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed [1534539619.42][CONN][INF] found SYNC in stream: {{sync;d03817ac-a24e-45c9-87e3-9b4190b29cf1}} it is #0 sent, queued... [1534539619.43][HTST][INF] sync KV found, uuid=d03817ac-a24e-45c9-87e3-9b4190b29cf1, timestamp=1534539619.418000 [1534539619.44][CONN][INF] found KV pair in stream: {{version;1.3.0}}, queued... [1534539619.44][HTST][INF] DUT greentea-client version: 1.3.0 [1534539619.46][CONN][INF] found KV pair in stream: {{timeout;120}}, queued... [1534539619.46][HTST][INF] setting timeout to: 120 sec [1534539619.49][CONN][INF] found KV pair in stream: {{host_test_name;lwm2m}}, queued... [1534539619.50][HTST][INF] host test class: '<class 'lwm2m.Lwm2m'>' [1534539619.50][HTST][INF] host test setup() call... [1534539619.50][HTST][INF] CALLBACKs updated [1534539619.50][HTST][INF] host test detected: lwm2m [1534539624.84][CONN][RXD] Network initialized, connecting...