tests: drivers: disk: disk_access: relax out-of-bounds erase assertion

The sector erase tests previously asserted for a specific -EINVAL return
code when attempting to erase past the end of the disk. This is too strict
for drivers that report a generic I/O error (-EIO) in such situations,
e.g. the STM32 SDMMC driver, which maps HAL failures to -EIO without
inspecting the precise root cause.

We can also note that the same logic was used in test_sector_write() and
test_sector_read().

This change avoids spurious test failures with targets that legitimately
return non-zero errors other than -EINVAL.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
1 file changed