tests: spi_loopback: Fix synchronization mistakes
There are a couple things going wrong in this test code right now.
First of all, there is no syncrhonization of when the async polling
thread should start polling, causing sometimes the poll to fail on tests
before the async test ran. Add a semaphore to fix this.
The lock test was setting up a nonsense NOP transfer of 0 length.
This might cause unexpected behavior and is not the point of
this test case.
But, still we should add a seperate test case specifically for
testing this instead.
Also add a teardown function to release the locks to allow other test
cases to run in case of some failures.
Also a minor change to remove some ARG_UNUSED invocations for some
arguments that are actually used.
Signed-off-by:
Declan Snyder <declan.snyder@nxp.com>
Loading
Please sign in to comment