Each of the wmfw error suites lists the truncated block header, truncated
block payload and garbage payload length tests twice, once with valid
block types and once with invalid block types. For the payload and
garbage length tests the second entry names wmfw_too_short_for_block_header
rather than the test on the preceding line, so the block header test is
run four times with invalid block types while the other two are only ever
run with valid ones.
Point the second entries at the intended tests so that
wmfw_too_short_for_block_payload() and wmfw_block_payload_len_garbage()
are also run with invalid block types, as the header test already is.
Fixes: feb5fb0615f3 ("firmware: cs_dsp: Add KUnit testing of wmfw error cases")
Signed-off-by: Mark Brown <[email protected]>
---
drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
index e7bf5dc474f5..b07978d90fa9 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
@@ -1222,9 +1222,9 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v0[]
= {
KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_valid_block_types_adsp2_gen_params),
KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload,
wmfw_valid_block_types_adsp2_gen_params),
- KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
+ KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage,
wmfw_valid_block_types_adsp2_gen_params),
- KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
+ KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage,
wmfw_invalid_block_types_gen_params),
{ } /* terminator */
};
@@ -1239,9 +1239,9 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v1[]
= {
KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_valid_block_types_adsp2_gen_params),
KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload,
wmfw_valid_block_types_adsp2_gen_params),
- KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
+ KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage,
wmfw_valid_block_types_adsp2_gen_params),
- KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
+ KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE(wmfw_too_short_for_alg_header),
KUNIT_CASE(wmfw_v1_alg_name_unterminated),
@@ -1261,9 +1261,9 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v2[]
= {
KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_valid_block_types_adsp2_gen_params),
KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload,
wmfw_valid_block_types_adsp2_gen_params),
- KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
+ KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage,
wmfw_valid_block_types_adsp2_gen_params),
- KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
+ KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE(wmfw_too_short_for_alg_header),
KUNIT_CASE(wmfw_v2_alg_name_exceeds_block),
@@ -1287,9 +1287,9 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v3[]
= {
KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_valid_block_types_halo_gen_params),
KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload,
wmfw_valid_block_types_halo_gen_params),
- KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
+ KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage,
wmfw_valid_block_types_halo_gen_params),
- KUNIT_CASE_PARAM(wmfw_too_short_for_block_header,
wmfw_invalid_block_types_gen_params),
+ KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage,
wmfw_invalid_block_types_gen_params),
KUNIT_CASE(wmfw_too_short_for_alg_header),
KUNIT_CASE(wmfw_v2_alg_name_exceeds_block),
--
2.47.3