2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/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 net: microchip: sparx5: Add VCAP debugfs KUNIT test 2022-11-21 11:33:02 +00:00
Makefile net: microchip: vcap: Add tc flower keys for lan966x 2023-02-10 08:03:09 +00:00
vcap_ag_api.h net: sparx5: Correct spelling in comments 2024-04-25 19:13:26 -07:00
vcap_api_client.h net: sparx5: Correct spelling in comments 2024-04-25 19:13:26 -07:00
vcap_api_debugfs_kunit.c net: microchip: Constify struct vcap_operations 2024-06-18 15:26:39 +02:00
vcap_api_debugfs.c net: microchip: sparx5: clean up error checking in vcap_show_admin() 2023-10-03 07:13:32 -07:00
vcap_api_debugfs.h net: microchip: sparx5: Add VCAP debugFS support 2022-11-21 11:33:02 +00: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_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_model_kunit.c net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model 2023-02-16 08:59:48 +01:00
vcap_model_kunit.h net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model 2023-02-16 08:59:48 +01:00
vcap_tc.c net: flow_dissector: Use 64bits for used_keys 2023-07-31 09:11:24 +01:00
vcap_tc.h net: flow_dissector: Use 64bits for used_keys 2023-07-31 09:11:24 +01:00