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

tests/subsys/usb/bos/usb.bos fails with native_posix and llvm/clang #30330

Closed
nashif opened this issue Nov 30, 2020 · 0 comments · Fixed by #31825
Closed

tests/subsys/usb/bos/usb.bos fails with native_posix and llvm/clang #30330

nashif opened this issue Nov 30, 2020 · 0 comments · Fixed by #31825
Assignees
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@nashif
Copy link
Member

nashif commented Nov 30, 2020

Describe the bug
currently the test fails when built with clang/llvm.

export ZEPHYR_TOOLCHAIN_VARIANT=llvm
twister -p native_posix -T tests/subsys/usb/bos/
*** Booting Zephyr OS build zephyr-v2.4.0-1831-g018d2b2325c9  ***
Running test suite test_osdesc
===================================================================
START - test_usb_bos_macros
length 57
D: Header
D: 05 0f 00 00 00 18 10 05 |........
D: 00 38 b6 08 34 a9 09 a0 |.8..4...
D: 47 8b fd a0 76 88 15 b6 |G...v...
D: 65 00 01 01 01 1c 10 05 |e.......
D: 00 df 60 dd d8 89 45 c7 |..`...E.
D: 4c 9c d2 65 9d 9e 64 8a |L..e..d.
D: 9f 00 00 03 06 03 00 02 |........
D: 00                      |.
D: webusb cap
D: 05 0f 39 00 02 18 10 05 |..9.....
D: 00 38 b6 08 34 a9 09 a0 |.8..4...
D: 47 8b fd a0 76 88 15 b6 |G...v...
D: webusb cap msos v2
D: 05 0f 39 00 02 1c 10 05 |..9.....
D: 00 df 60 dd d8 89 45 c7 |..`...E.
D: 4c 9c d2 65 9d 9e 64 8a |L..e..d.
D: 9f 00 00 03             |....

    Assertion failed at CMAKE_SOURCE_DIR/src/test_bos.c:194: test_usb_bos_macros: (!memcmp(hdr, &webusb_bos_descriptor, len) || !memcmp(hdr, &webusb_bos_descriptor_2, len) is false)
Wrong data
 FAIL - test_usb_bos_macros
===================================================================
START - test_usb_bos
test_usb_bos: ret 0 len 57 data 0x80576d9

    Assertion failed at CMAKE_SOURCE_DIR/src/test_bos.c:216: test_usb_bos: (!memcmp(data, &webusb_bos_descriptor, len) || !memcmp(data, &webusb_bos_descriptor_2, len) is false)
Wrong data
 FAIL - test_usb_bos
===================================================================
Test suite test_osdesc failed.
===================================================================
PROJECT EXECUTION FAILED

Expected behavior
Test should pass.

Impact
Not able to integrate CI testing for clang/llvm

Logs and console output
See above

Environment (please complete the following information):

  • OS: Linux
  • Toolchain clang/llvm 10.
@nashif nashif added bug The issue is a bug, or the PR is fixing a bug area: USB Universal Serial Bus priority: medium Medium impact/importance bug labels Nov 30, 2020
nashif pushed a commit to jfischer-no/zephyr that referenced this issue Feb 1, 2021
Use BOS header structure directly we have access to
instead of casting extern const pointers.

Fixes: zephyrproject-rtos#30330

Signed-off-by: Johann Fischer <[email protected]>
nashif pushed a commit that referenced this issue Feb 3, 2021
Use BOS header structure directly we have access to
instead of casting extern const pointers.

Fixes: #30330

Signed-off-by: Johann Fischer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants