Skip to content

STM32 I2C API v1 fails some I2C tests #96

Open
@multiplemonomials

Description

@multiplemonomials

The test case currently outputs:

4: [1667837160.17][CONN][RXD] >>> Running case #1: 'Correct Address - Single Byte'...
4: [1667837160.17][CONN][INF] found KV pair in stream: {{__testcase_start;Correct Address - Single Byte}}, queued...
4: [1667837160.17][CONN][INF] found KV pair in stream: {{__testcase_finish;Correct Address - Single Byte;1;0}}, queued...
4: [1667837160.18][CONN][RXD] >>> 'Correct Address - Single Byte': 1 passed, 0 failed
4: [1667837160.18][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.18][CONN][RXD]
4: [1667837160.18][CONN][RXD] >>> Running case #2: 'Correct Address - Transaction'...
4: [1667837160.18][CONN][INF] found KV pair in stream: {{__testcase_start;Correct Address - Transaction}}, queued...
4: [1667837160.20][CONN][RXD] >>> 'Correct Address - Transaction': 1 passed, 0 failed
4: [1667837160.20][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.20][CONN][RXD]
4: [1667837160.20][CONN][INF] found KV pair in stream: {{__testcase_finish;Correct Address - Transaction;1;0}}, queued...
4: [1667837160.22][CONN][RXD] >>> Running case #3: 'Incorrect Address - Single Byte'...
4: [1667837160.22][CONN][RXD] <greentea test suite>:55::FAIL: Expected 1 Was 2
4: [1667837160.22][CONN][INF] found KV pair in stream: {{__testcase_start;Incorrect Address - Single Byte}}, queued...
4: [1667837160.22][CONN][INF] found KV pair in stream: {{__testcase_finish;Incorrect Address - Single Byte;0;1}}, queued...
4: [1667837160.23][CONN][RXD] >>> 'Incorrect Address - Single Byte': 0 passed, 1 failed with reason 'Test Cases Failed'
4: [1667837160.23][CONN][RXD]
4: [1667837160.23][CONN][RXD]
4: [1667837160.23][CONN][RXD] >>> Running case #4: 'Incorrect Address - Transaction'...
4: [1667837160.25][CONN][RXD] >>> 'Incorrect Address - Transaction': 1 passed, 0 failed
4: [1667837160.25][CONN][INF] found KV pair in stream: {{__testcase_start;Incorrect Address - Transaction}}, queued...
4: [1667837160.25][CONN][INF] found KV pair in stream: {{__testcase_finish;Incorrect Address - Transaction;1;0}}, queued...
4: [1667837160.26][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.26][CONN][RXD]
4: [1667837160.26][CONN][RXD] >>> Running case #5: 'Incorrect Address - Async'...
4: [1667837160.26][CONN][INF] found KV pair in stream: {{__testcase_start;Incorrect Address - Async}}, queued...
4: [1667837160.26][CONN][INF] found KV pair in stream: {{__testcase_finish;Incorrect Address - Async;1;0}}, queued...
4: [1667837160.28][CONN][RXD] >>> 'Incorrect Address - Async': 1 passed, 0 failed
4: [1667837160.28][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.28][CONN][RXD]
4: [1667837160.28][CONN][RXD] >>> Running case #6: 'Simple Write - Single Byte'...
4: [1667837160.28][CONN][INF] found KV pair in stream: {{__testcase_start;Simple Write - Single Byte}}, queued...
4: [1667837160.30][CONN][RXD] >>> 'Simple Write - Single Byte': 1 passed, 0 failed
4: [1667837160.30][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.30][CONN][RXD]
4: [1667837160.30][CONN][RXD] >>> Running case #7: 'Simple Read - Single Byte'...
4: [1667837160.30][CONN][INF] found KV pair in stream: {{__testcase_finish;Simple Write - Single Byte;1;0}}, queued...
4: [1667837160.31][CONN][RXD] >>> 'Simple Read - Single Byte': 1 passed, 0 failed
4: [1667837160.31][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.31][CONN][RXD]
4: [1667837160.31][CONN][INF] found KV pair in stream: {{__testcase_start;Simple Read - Single Byte}}, queued...
4: [1667837160.31][CONN][INF] found KV pair in stream: {{__testcase_finish;Simple Read - Single Byte;1;0}}, queued...
4: [1667837160.33][CONN][RXD] >>> Running case #8: 'Simple Write - Transaction'...
4: [1667837160.33][CONN][INF] found KV pair in stream: {{__testcase_start;Simple Write - Transaction}}, queued...
4: [1667837160.33][CONN][INF] found KV pair in stream: {{__testcase_finish;Simple Write - Transaction;1;0}}, queued...
4: [1667837160.34][CONN][RXD] >>> 'Simple Write - Transaction': 1 passed, 0 failed
4: [1667837160.34][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.34][CONN][RXD]
4: [1667837160.34][CONN][RXD] >>> Running case #9: 'Simple Read - Transaction'...
4: [1667837160.34][CONN][INF] found KV pair in stream: {{__testcase_start;Simple Read - Transaction}}, queued...
4: [1667837160.36][CONN][RXD] >>> 'Simple Read - Transaction': 1 passed, 0 failed
4: [1667837160.36][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.36][CONN][RXD]
4: [1667837160.36][CONN][RXD] >>> Running case #10: 'Mixed Usage - Single Byte -> repeated -> Transaction'...
4: [1667837160.36][CONN][INF] found KV pair in stream: {{__testcase_finish;Simple Read - Transaction;1;0}}, queued...
4: [1667837160.38][CONN][RXD] <greentea test suite>:141::FAIL: Expected 0 Was 1
4: [1667837160.38][CONN][INF] found KV pair in stream: {{__testcase_start;Mixed Usage - Single Byte -> repeated -> Transaction}}, queued...
4: [1667837160.39][CONN][RXD] >>> 'Mixed Usage - Single Byte -> repeated -> Transaction': 0 passed, 1 failed with reason 'Test Cases Failed'
4: [1667837160.39][CONN][RXD]
4: [1667837160.39][CONN][RXD]
4: [1667837160.39][CONN][INF] found KV pair in stream: {{__testcase_finish;Mixed Usage - Single Byte -> repeated -> Transaction;0;1}}, queued...
4: [1667837160.41][CONN][RXD] >>> Running case #11: 'Mixed Usage - Transaction -> repeated -> Single Byte'...
4: [1667837160.41][CONN][INF] found KV pair in stream: {{__testcase_start;Mixed Usage - Transaction -> repeated -> Single Byte}}, queued...
4: [1667837160.42][CONN][RXD] <greentea test suite>:150::FAIL: Expected 0 Was 1
4: [1667837160.42][CONN][INF] found KV pair in stream: {{__testcase_finish;Mixed Usage - Transaction -> repeated -> Single Byte;0;1}}, queued...
4: [1667837160.44][CONN][RXD] >>> 'Mixed Usage - Transaction -> repeated -> Single Byte': 0 passed, 1 failed with reason 'Test Cases Failed'
4: [1667837160.44][CONN][RXD]
4: [1667837160.44][CONN][RXD]
4: [1667837160.44][CONN][RXD] >>> Running case #12: 'Simple Write - Async'...
4: [1667837160.44][CONN][INF] found KV pair in stream: {{__testcase_start;Simple Write - Async}}, queued...
4: [1667837160.46][CONN][RXD] >>> 'Simple Write - Async': 1 passed, 0 failed
4: [1667837160.46][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.46][CONN][RXD]
4: [1667837160.46][CONN][RXD] >>> Running case #13: 'Simple Read - Async'...
4: [1667837160.46][CONN][INF] found KV pair in stream: {{__testcase_finish;Simple Write - Async;1;0}}, queued...
4: [1667837160.46][CONN][INF] found KV pair in stream: {{__testcase_start;Simple Read - Async}}, queued...
4: [1667837160.47][CONN][RXD] >>> 'Simple Read - Async': 1 passed, 0 failed
4: [1667837160.47][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.47][CONN][RXD]
4: [1667837160.47][CONN][INF] found KV pair in stream: {{__testcase_finish;Simple Read - Async;1;0}}, queued...
4: [1667837160.49][CONN][RXD] >>> Running case #14: 'Mixed Usage - Async -> repeated -> Transaction'...
4: [1667837160.49][CONN][INF] found KV pair in stream: {{__testcase_start;Mixed Usage - Async -> repeated -> Transaction}}, queued...
4: [1667837160.49][CONN][INF] found KV pair in stream: {{__testcase_finish;Mixed Usage - Async -> repeated -> Transaction;1;0}}, queued...
4: [1667837160.50][CONN][RXD] >>> 'Mixed Usage - Async -> repeated -> Transaction': 1 passed, 0 failed
4: [1667837160.50][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.50][CONN][RXD]
4: [1667837160.50][CONN][RXD] >>> Running case #15: 'Mixed Usage - Async -> repeated -> Single Byte'...
4: [1667837160.52][CONN][RXD] >>> 'Mixed Usage - Async -> repeated -> Single Byte': 1 passed, 0 failed
4: [1667837160.52][CONN][INF] found KV pair in stream: {{__testcase_start;Mixed Usage - Async -> repeated -> Single Byte}}, queued...
4: [1667837160.52][CONN][INF] found KV pair in stream: {{__testcase_finish;Mixed Usage - Async -> repeated -> Single Byte;1;0}}, queued...
4: [1667837160.54][CONN][RXD] <greentea test suite>:0::PASS
4: [1667837160.54][CONN][RXD]
4: [1667837160.54][CONN][RXD] >>> Running case #16: 'Mixed Usage - Transaction -> repeated -> Async'...
4: [1667837160.54][CONN][INF] found KV pair in stream: {{__testcase_start;Mixed Usage - Transaction -> repeated -> Async}}, queued...
4: [1667837160.63][CONN][RXD] <greentea test suite>:226::FAIL: Expected 0 Was 1
4: [1667837160.63][CONN][INF] found KV pair in stream: {{__testcase_finish;Mixed Usage - Transaction -> repeated -> Async;0;1}}, queued...
4: [1667837160.65][CONN][RXD] >>> 'Mixed Usage - Transaction -> repeated -> Async': 0 passed, 1 failed with reason 'Test Cases Failed'
4: [1667837160.65][CONN][RXD]
4: [1667837160.65][CONN][RXD]
4: [1667837160.65][CONN][RXD] >>> Running case #17: 'Mixed Usage - Single Byte -> repeated -> Async'...
4: [1667837160.65][CONN][INF] found KV pair in stream: {{__testcase_start;Mixed Usage - Single Byte -> repeated -> Async}}, queued...
4: [1667837161.66][CONN][RXD] <greentea test suite>:248::FAIL: Expected 0 Was 2
4: [1667837161.67][CONN][RXD] >>> 'Mixed Usage - Single Byte -> repeated -> Async': 0 passed, 1 failed with reason 'Test Cases Failed'
4: [1667837161.67][CONN][RXD]
4: [1667837161.67][CONN][RXD]
4: [1667837161.67][CONN][INF] found KV pair in stream: {{__testcase_finish;Mixed Usage - Single Byte -> repeated -> Async;0;1}}, queued...
4: [1667837161.69][CONN][RXD] >>> Running case #18: 'Async causes thread to sleep?'...
4: [1667837161.69][CONN][INF] found KV pair in stream: {{__testcase_start;Async causes thread to sleep?}}, queued...
4: [1667837162.69][CONN][RXD] <greentea test suite>:269::FAIL: Expected 0 Was 2
4: [1667837162.69][CONN][INF] found KV pair in stream: {{__testcase_finish;Async causes thread to sleep?;0;1}}, queued...
4: [1667837162.71][CONN][RXD] >>> 'Async causes thread to sleep?': 0 passed, 1 failed with reason 'Test Cases Failed'
4: [1667837162.71][CONN][RXD]
4: [1667837162.71][CONN][RXD]
4: [1667837162.71][CONN][RXD] >>> Test cases: 12 passed, 6 failed with reason 'Test Cases Failed'
4: [1667837162.71][CONN][RXD] >>> TESTS FAILED!
4: [1667837162.71][CONN][RXD]
4: [1667837162.73][CONN][RXD] -----------------------
4: [1667837162.73][CONN][RXD] 0 Tests 6 Failures 0 Ignored
4: [1667837162.73][CONN][RXD] FAIL
4: [1667837162.73][CONN][INF] found KV pair in stream: {{__testcase_summary;12;6}}, queued...
4: [1667837162.73][CONN][INF] found KV pair in stream: {{end;failure}}, queued...
4: [1667837162.73][CONN][INF] found KV pair in stream: {{__exit;0}}, queued...
4: [1667837162.73][HTST][INF] __exit(0)
4: [1667837162.73][HTST][INF] __notify_complete(False)
4: [1667837162.73][HTST][INF] __exit_event_queue received
4: [1667837162.73][HTST][INF] test suite run finished after 2.65 sec...
4: [1667837162.74][CONN][INF] received special event '__host_test_finished' value='True', finishing
4: [1667837162.79][HTST][INF] CONN exited with code: 0
4: [1667837162.79][HTST][INF] Some events in queue
4: [1667837162.79][HTST][INF] stopped consuming events
4: [1667837162.79][HTST][INF] host test result() call skipped, received: False
4: [1667837162.79][HTST][INF] calling blocking teardown()
4: [1667837162.79][HTST][INF] teardown() finished
4: [1667837162.79][HTST][INF] {{result;failure}}
4: CMake Error at mbed-run-greentea-testshield-i2c-basic.cmake:20 (execute_process):
4:   execute_process failed command indexes: 1
4:
4:
1/1 Test #4: testshield-i2c-basic .............***Failed   13.03 sec

Looks like there are two issues in play:

  • Can't handle repeated starts after single-byte operations
  • Wrong return code from NACKs in single-byte mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDis is brokenSTMicroOnly affects STMicro targets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions