mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 13:43:21 -04:00
wifi: iwlwifi: tests: check for device names
Add a unit test that checks that each device has a name, either via the specific name entry or the config's name. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250502151751.c04287134280.Iedc7c05a41dc8bfe04dc8b95fea38543513eac2d@changeid
This commit is contained in:
committed by
Miri Korenblit
parent
a925fe703d
commit
fa22a93e2a
@@ -47,6 +47,17 @@ static void devinfo_table_order(struct kunit *test)
|
||||
}
|
||||
}
|
||||
|
||||
static void devinfo_names(struct kunit *test)
|
||||
{
|
||||
int idx;
|
||||
|
||||
for (idx = 0; idx < iwl_dev_info_table_size; idx++) {
|
||||
const struct iwl_dev_info *di = &iwl_dev_info_table[idx];
|
||||
|
||||
KUNIT_ASSERT_TRUE(test, di->name || di->cfg->name);
|
||||
}
|
||||
}
|
||||
|
||||
static void devinfo_pci_ids(struct kunit *test)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
@@ -71,6 +82,7 @@ static void devinfo_pci_ids(struct kunit *test)
|
||||
|
||||
static struct kunit_case devinfo_test_cases[] = {
|
||||
KUNIT_CASE(devinfo_table_order),
|
||||
KUNIT_CASE(devinfo_names),
|
||||
KUNIT_CASE(devinfo_pci_ids),
|
||||
{}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user