Skip to content

Commit

Permalink
net: microchip: sparx5: Add VCAP debugfs KUNIT test
Browse files Browse the repository at this point in the history
This tests the functionality of the debugFS support:

- finding valid keyset on an address
- raw VCAP output
- full rule VCAP output

Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Steen Hegelund authored and David S. Miller committed Nov 21, 2022
1 parent 71c9de9 commit 552b7d1
Show file tree
Hide file tree
Showing 4 changed files with 553 additions and 3 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/microchip/vcap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ config VCAP_KUNIT_TEST
bool "KUnit test for VCAP library" if !KUNIT_ALL_TESTS
depends on KUNIT
depends on KUNIT=y && VCAP=y && y
select DEBUG_FS
default KUNIT_ALL_TESTS
help
This builds unit tests for the VCAP library.
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,3 +776,7 @@ struct dentry *vcap_debugfs(struct device *dev, struct dentry *parent,
return dir;
}
EXPORT_SYMBOL_GPL(vcap_debugfs);

#ifdef CONFIG_VCAP_KUNIT_TEST
#include "vcap_api_debugfs_kunit.c"
#endif
Loading

0 comments on commit 552b7d1

Please sign in to comment.