Skip to content

Commit 0574ac7

Browse files
decsnydkalowsk
authored andcommitted
tests: spi_loopback: skip hold_on_cs test if not supported
This early exit section is only reached if there is an error. In the case of not supported, the ret variable will be 0 and zassert won't happen. This is because the test was meant to be skipped, not passed or failed, in this case. So add the skip call. Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
1 parent b9b3529 commit 0574ac7

File tree

1 file changed

+2
-0
lines changed
  • tests/drivers/spi/spi_loopback/src

1 file changed

+2
-0
lines changed

tests/drivers/spi/spi_loopback/src/spi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,8 @@ ZTEST(spi_extra_api_features, test_spi_hold_on_cs)
10171017
early_exit:
10181018
hold_spec->config.operation &= ~SPI_HOLD_ON_CS;
10191019
zassert_false(ret, "SPI transceive failed, code %d", ret);
1020+
/* if there was no error then it was meant to be a skip at this point */
1021+
ztest_test_skip();
10201022
}
10211023

10221024
/*

0 commit comments

Comments
 (0)