Path: blob/main/sys/contrib/dev/iwlwifi/mvm/tests/hcmd.c
48427 views
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause1/*2* KUnit tests for channel helper functions3*4* Copyright (C) 2025 Intel Corporation5*/6#include <kunit/test.h>78#include <iwl-trans.h>9#include "../mvm.h"1011MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");1213static void test_hcmd_names_sorted(struct kunit *test)14{15for (int i = 0; i < iwl_mvm_groups_size; i++) {16const struct iwl_hcmd_arr *arr = &iwl_mvm_groups[i];1718if (!arr->arr)19continue;2021for (int j = 0; j < arr->size - 1; j++)22KUNIT_EXPECT_LE(test, arr->arr[j].cmd_id,23arr->arr[j + 1].cmd_id);24}25}2627static struct kunit_case hcmd_names_cases[] = {28KUNIT_CASE(test_hcmd_names_sorted),29{},30};3132static struct kunit_suite hcmd_names = {33.name = "iwlmvm-hcmd-names",34.test_cases = hcmd_names_cases,35};3637kunit_test_suite(hcmd_names);383940