[RESEND PATCH] net: microchip: vcap: Add typegroup table terminators in kunit tests

Jacob Keller jacob.e.keller at intel.com
Thu Nov 21 12:35:53 PST 2024



On 11/19/2024 1:32 PM, Guenter Roeck wrote:
> VCAP API unit tests fail randomly with errors such as
> 
>    # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:387
>    Expected 134 + 7 == iter.offset, but
>        134 + 7 == 141 (0x8d)
>        iter.offset == 17214 (0x433e)
>    # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:388
>    Expected 5 == iter.reg_idx, but
>        iter.reg_idx == 702 (0x2be)
>    # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:389
>    Expected 11 == iter.reg_bitpos, but
>        iter.reg_bitpos == 15 (0xf)
>    # vcap_api_iterator_init_test: pass:0 fail:1 skip:0 total:1
> 
> Comments in the code state that "A typegroup table ends with an all-zero
> terminator". Add the missing terminators.
> 
> Some of the typegroups did have a terminator of ".offset = 0, .width = 0,
> .value = 0,". Replace those terminators with "{ }" (no trailing ',') for
> consistency and to excplicitly state "this is a terminator".
> 
> Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
> Cc: Steen Hegelund <steen.hegelund at microchip.com>
> Signed-off-by: Guenter Roeck <linux at roeck-us.net>
> ---

Reviewed-by: Jacob Keller <jacob.e.keller at intel.com>



More information about the linux-arm-kernel mailing list