Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFM32: pinmap test fails #12371

Closed
amq opened this issue Feb 5, 2020 · 5 comments · Fixed by #12496
Closed

EFM32: pinmap test fails #12371

amq opened this issue Feb 5, 2020 · 5 comments · Fixed by #12496

Comments

@amq
Copy link
Contributor

amq commented Feb 5, 2020

Description of defect

tests-mbed_hal-pinmap always fails on EFM32. The LED shows the mbed crash pattern after I run it. Other tests apart of #12373 are fine.

It errors out at gpio_pinmap with:

Expected 4294967295 Was -1

If I comment out gpio_pinmap, then the test fails at gpio_irq_pinmap, also with a crash.

Related to #9449 and #10644

Target(s) affected by this defect ?

Verified on EFM32GG_STK3700, EFM32PG12_STK3402 and EFM32GG11_STK3701, most probably affects all EFM32 targets.

Toolchain(s) (name and version) displaying this defect ?

GNU Tools Arm Embedded 9 2019-q4-major

What version of Mbed-os are you using (tag or sha) ?

master at f73a62afbf4052b4da8c5b862ffb4708a80c1b6e

Also verified with:

mbed-os-5.13.4 at 1bf6b20df9d3cd5f29f001ffc6f0d0fcbbb96118

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli 1.10.2

How is this defect reproduced ?

mbed test --run -t GCC_ARM -m EFM32PG12_STK3402 -DMBED_EXTENDED_TESTS=1 -n tests-mbed_hal-pinmap -v
mbedgt: greentea test automation tool ver. 1.7.4
mbedgt: test specification file '.\BUILD\tests\EFM32PG12_STK3402\GCC_ARM\test_spec.json' (specified with --test-spec option)
mbedgt: using '.\BUILD\tests\EFM32PG12_STK3402\GCC_ARM\test_spec.json' from current directory!
mbedgt: detecting connected mbed-enabled devices...
[1580903499.40][mbedls.lstools_base]No valid file found to update JLink device details
mbedgt: detected 1 device
        | platform_name     | platform_name_unique | serial_port | mount_point | target_id                |
        |-------------------|----------------------|-------------|-------------|--------------------------|
        | EFM32PG12_STK3402 | EFM32PG12_STK3402[0] | COM5        | D:          | 204003F00001DCA9D5A8EF33 |
mbedgt: processing target 'EFM32PG12_STK3402' toolchain 'GCC_ARM' compatible platforms... (note: switch set to --parallel 1)
        | platform_name     | platform_name_unique | serial_port | mount_point | target_id                |
        |-------------------|----------------------|-------------|-------------|--------------------------|
        | EFM32PG12_STK3402 | EFM32PG12_STK3402[0] | COM5:115200 | D:          | 204003F00001DCA9D5A8EF33 |
mbedgt: test case filter (specified with -n option)
        tests-mbed_hal-pinmap
        test filtered in 'tests-mbed_hal-pinmap'
mbedgt: running 1 test for platform 'EFM32PG12_STK3402' and toolchain 'GCC_ARM'
        use 1 instance of execution threads for testing
mbedgt: checking for 'host_tests' directory above image directory structure
        found 'host_tests' directory in: 'TESTS\host_tests'
mbedgt: selecting test case observer...
        calling mbedhtrun: mbedhtrun -m EFM32PG12_STK3402 -p COM5:115200 -f "BUILD/tests/EFM32PG12_STK3402/GCC_ARM/TESTS/mbed_hal/pinmap/pinmap.bin" -e "TESTS\host_tests" -d D: -c default -t 204003F00001DCA9D5A8EF33 -r default -C 4 -R 2 --sync 5 -P 60
mbedgt: mbed-host-test-runner: started
[1580903500.19][HTST][INF] host test executor ver. 0.0.12
[1580903500.19][HTST][INF] copy image onto target...
[1580903500.19][COPY][INF] Waiting up to 60 sec for '204003F00001DCA9D5A8EF33' mount point (current is 'D:')...
[1580903500.21][mbedls.lstools_base]No valid file found to update JLink device details
        1 file(s) copied.
[1580903506.78][mbedls.lstools_base]No valid file found to update JLink device details
[1580903507.33][mbedls.lstools_base]No valid file found to update JLink device details
[1580903507.88][mbedls.lstools_base]No valid file found to update JLink device details
[1580903508.43][mbedls.lstools_base]No valid file found to update JLink device details
[1580903508.99][mbedls.lstools_base]No valid file found to update JLink device details
[1580903509.50][HTST][INF] starting host test process...
[1580903510.29][CONN][INF] starting connection process...
[1580903510.29][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1580903510.29][CONN][INF] initializing serial port listener...
[1580903510.29][PLGN][INF] Waiting up to 60 sec for '204003F00001DCA9D5A8EF33' serial port (current is 'COM5')...
[1580903510.30][HTST][INF] setting timeout to: 60 sec
[1580903510.31][mbedls.lstools_base]No valid file found to update JLink device details
[1580903510.31][SERI][INF] serial(port=COM5, baudrate=115200, read_timeout=0.01, write_timeout=5)
[1580903510.31][SERI][INF] reset device using 'default' plugin...
[1580903510.57][SERI][INF] waiting 2.00 sec after reset
[1580903512.57][SERI][INF] wait for it...
[1580903512.57][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1580903512.57][CONN][INF] sending up to 5 __sync packets (specified with --sync=5)
[1580903512.57][CONN][INF] sending preamble 'cccb9c00-961a-4776-a054-06c20b165435'
[1580903512.57][SERI][TXD] {{__sync;cccb9c00-961a-4776-a054-06c20b165435}}
[1580903512.59][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
[1580903512.59][CONN][INF] found SYNC in stream: {{__sync;cccb9c00-961a-4776-a054-06c20b165435}} it is #0 sent, queued...
[1580903512.59][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
[1580903512.59][CONN][INF] found KV pair in stream: {{__timeout;20}}, queued...
[1580903512.60][HTST][INF] sync KV found, uuid=cccb9c00-961a-4776-a054-06c20b165435, timestamp=1580903512.594363
[1580903512.60][HTST][INF] DUT greentea-client version: 1.3.0
[1580903512.60][HTST][INF] setting timeout to: 20 sec
[1580903512.61][CONN][RXD] >>> Running 1 test cases...
[1580903512.61][CONN][RXD]
[1580903512.61][CONN][INF] found KV pair in stream: {{__host_test_name;default_auto}}, queued...
[1580903512.61][CONN][INF] found KV pair in stream: {{__testcase_count;1}}, queued...
[1580903512.61][CONN][INF] found KV pair in stream: {{__testcase_name;pinmap - validation}}, queued...
[1580903512.61][HTST][INF] host test class: '<class 'mbed_os_tools.test.host_tests.default_auto.DefaultAuto'>'
[1580903512.61][HTST][INF] host test setup() call...
[1580903512.61][HTST][INF] CALLBACKs updated
[1580903512.61][HTST][INF] host test detected: default_auto
[1580903512.62][CONN][RXD] >>> Running case #1: 'pinmap - validation'...
[1580903512.62][CONN][RXD] Testing pinmap gpio_pinmap
[1580903512.62][CONN][INF] found KV pair in stream: {{__testcase_start;pinmap - validation}}, queued...
mbedgt: :114::FAIL: Expected 4294967295 Was -1
[1580903512.64][CONN][RXD] :114::FAIL: Expected 4294967295 Was -1
[1580903512.64][CONN][INF] found KV pair in stream: {{__testcase_finish;pinmap - validation;0;1}}, queued...
[1580903512.65][CONN][RXD] >>> 'pinmap - validation': 0 passed, 1 failed with reason 'Assertion Failed'
[1580903512.65][CONN][RXD]
[1580903512.65][CONN][RXD] >>> Test cases: 0 passed, 1 failed with reason 'Assertion Failed'
[1580903512.65][CONN][RXD] >>> TESTS FAILED!
[1580903512.65][CONN][INF] found KV pair in stream: {{__testcase_summary;0;1}}, queued...
[1580903512.65][CONN][INF] found KV pair in stream: {{end;failure}}, queued...
[1580903512.65][CONN][INF] found KV pair in stream: {{__exit;0}}, queued...
[1580903512.65][HTST][INF] __exit(0)
[1580903512.65][HTST][INF] __notify_complete(False)
[1580903512.65][HTST][INF] __exit_event_queue received
[1580903512.65][HTST][INF] test suite run finished after 0.06 sec...
[1580903512.66][CONN][INF] received special event '__host_test_finished' value='True', finishing
[1580903512.70][HTST][INF] CONN exited with code: 0
[1580903512.70][HTST][INF] Some events in queue
[1580903512.70][HTST][INF] stopped consuming events
[1580903512.70][HTST][INF] host test result() call skipped, received: False
[1580903512.70][HTST][INF] calling blocking teardown()
[1580903512.70][HTST][INF] teardown() finished
[1580903512.70][HTST][INF] {{result;failure}}
mbedgt: retry mbedhtrun 1/1
mbedgt: ['mbedhtrun', '-m', 'EFM32PG12_STK3402', '-p', 'COM5:115200', '-f', '"BUILD/tests/EFM32PG12_STK3402/GCC_ARM/TESTS/mbed_hal/pinmap/pinmap.bin"', '-e', '"TESTS\\host_tests"', '-d', 'D:', '-c', 'default', '-t', '204003F00001DCA9D5A8EF33', '-r', 'default', '-C', '4', '-R', '2', '--sync', '5', '-P', '60'] failed after 1 count
mbedgt: checking for GCOV data...
mbedgt: mbed-host-test-runner: stopped and returned 'FAIL'
mbedgt: test on hardware with target id: 204003F00001DCA9D5A8EF33
mbedgt: test suite 'tests-mbed_hal-pinmap' ........................................................... FAIL in 13.03 sec
        test case: 'pinmap - validation' ............................................................. FAIL in 0.02 sec
mbedgt: test case summary: 0 passes, 1 failure
mbedgt: all tests finished!
mbedgt: shuffle seed: 0.5712273915
mbedgt: test suite report:
| target                    | platform_name     | test suite            | result | elapsed_time (sec) | copy_method |
|---------------------------|-------------------|-----------------------|--------|--------------------|-------------|
| EFM32PG12_STK3402-GCC_ARM | EFM32PG12_STK3402 | tests-mbed_hal-pinmap | FAIL   | 13.03              | default     |
mbedgt: test suite results: 1 FAIL
mbedgt: test case report:
| target                    | platform_name     | test suite            | test case           | passed | failed | result | elapsed_time (sec) |
|---------------------------|-------------------|-----------------------|---------------------|--------|--------|--------|--------------------|
| EFM32PG12_STK3402-GCC_ARM | EFM32PG12_STK3402 | tests-mbed_hal-pinmap | pinmap - validation | 0      | 1      | FAIL   | 0.02               |
mbedgt: test case results: 1 FAIL
mbedgt: completed in 13.36 sec
mbedgt: exited with code 1
[mbed] Working path "C:\Users\amq\mbed-os" (program)
[mbed] Exec "mbedgt --test-spec .\BUILD\tests\EFM32PG12_STK3402\GCC_ARM\test_spec.json -n tests-mbed_hal-pinmap -V" in "C:\Users\amq\mbed-os"
[mbed] ERROR: "mbedgt" returned error.
       Code: 1
       Path: "C:\Users\amq\mbed-os"
       Command: "mbedgt --test-spec .\BUILD\tests\EFM32PG12_STK3402\GCC_ARM\test_spec.json -n tests-mbed_hal-pinmap -V"
---
@ciarmcom
Copy link
Member

ciarmcom commented Feb 5, 2020

Internal Jira reference: https://jira.arm.com/browse/MBOTRIAGE-2535

@amq
Copy link
Contributor Author

amq commented Feb 6, 2020

The solution is to change

    NC = (unsigned int) 0xFFFFFFFFUL

to

    NC = (int) 0xFFFFFFFF

in PinNames.h. I'll create a PR shortly.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 6, 2020

Thanks @amq !

@stevew817
Copy link
Contributor

Was the mentioned PR ever created? :)

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 24, 2020

I don't think I've seen one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants