test: dm: spi: Fix sandbox dm_test_spi_find()
authorBin Meng <bmeng.cn@gmail.com>
Mon, 9 Sep 2019 13:00:03 +0000 (06:00 -0700)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 27 Jan 2020 16:57:21 +0000 (22:27 +0530)
commitbfcd9298b29c16fdada9d8e772dd9aaff7760f43
tree4b0289ac68d0b18af3ab672bbbb346a67495b618
parent7bacce524d48594dae399f9ee9280ab105f6c8cf
test: dm: spi: Fix sandbox dm_test_spi_find()

Per sandbox_cs_info(), sandbox spi controller only supports chip
select 0. Current test case tries to locate devices on chip select
1, and any call to spi_get_bus_and_cs() or spi_cs_info() with cs
number 1 should not return 0.

This updates the test case to handle it correctly.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
test/dm/spi.c