3
0
Fork 0
forked from mirrors/linux
kernel/drivers/net/ethernet/microchip/vcap
Guenter Roeck f164b29663 net: microchip: vcap: Add typegroup table terminators in kunit tests
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: 67d637516f ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
Cc: Steen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20241119213202.2884639-1-linux@roeck-us.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-11-24 16:52:13 -08:00
..
Kconfig
Makefile
vcap_ag_api.h net: sparx5: Correct spelling in comments 2024-04-25 19:13:26 -07:00
vcap_api.c net: sparx5: Correct spelling in comments 2024-04-25 19:13:26 -07:00
vcap_api.h net: microchip: Constify struct vcap_operations 2024-06-18 15:26:39 +02:00
vcap_api_client.h net: sparx5: Correct spelling in comments 2024-04-25 19:13:26 -07:00
vcap_api_debugfs.c
vcap_api_debugfs.h
vcap_api_debugfs_kunit.c net: microchip: Constify struct vcap_operations 2024-06-18 15:26:39 +02:00
vcap_api_kunit.c net: microchip: vcap: Add typegroup table terminators in kunit tests 2024-11-24 16:52:13 -08:00
vcap_api_private.h net: sparx5: Correct spelling in comments 2024-04-25 19:13:26 -07:00
vcap_model_kunit.c
vcap_model_kunit.h
vcap_tc.c
vcap_tc.h