]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
firmware: cs_dsp: Simplify suppressing log messages during KUnit testing
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 10 Mar 2026 13:03:43 +0000 (13:03 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 10 Mar 2026 14:53:05 +0000 (14:53 +0000)
Rework the way that kernel log messages are rate-limited or suppressed
while running the cs_dsp KUnit tests.

Under normal conditions cs_dsp doesn't produce an unreasonable number of
log messages, and state changes are relatively infrequent. But the KUnit
tests run through a very large number of test cases, especially error
cases, and this produces an unusually large amount of log output from
cs_dsp.

The original fix for this in commit 10db9f6899dd ("firmware: cs_dsp:
rate-limit log messages in KUnit builds") was effective but not pretty.
It involved different definitions of the log macros for KUnit and
not-KUnit builds, and exported variables for the KUnit tests to disable
log messages. I would have preferred to turn the log macros into real
functions that can contain a KUNIT_STATIC_STUB_REDIRECT(), but the
dev_xxx() macros don't have a version that take va_args, so they can't
be wrapped by a function.

This patch enables the use of a KUNIT_STATIC_STUB_REDIRECT() instead
of exported variables, and avoids the need for different definitions of
the debug macros in KUnit and not-KUnit builds.

- A new function cs_dsp_can_emit_message() returns true if the
  messages can be emitted to the kernel log. In a normal not-KUnit build
  this function collapses to simply returning true. In KUnit builds it
  will rate-limit output, and this uses a single static rate limiter so
  it limits the overall rate across all cs_dsp log messages. The KUnit
  test can redirect it to change the suppression behavior.

- The cs_dsp debug message macros are changed to only call the dev_xxx()
  if cs_dsp_can_emit_message() returns true. These are still macros so
  there is no problem wrapping the dev_xxx(). For a normal not-KUnit
  build cs_dsp_can_emit_message() always returns true so these macros
  simplify down to being identical to calling dev_xxx() directly.

- The KUnit tests that cause a lot of cs_dsp messages now redirect
  cs_dsp_can_emit_message() to a local function. This returns false
  to suppress cs_dsp messages, unless DEBUG is defined for that test.

I have checked that for a x86_64 production (non-KUnit) build the
disassembled cs_dsp.o is identical to what was generated from the
original code. So the complier is correctly simplifying the
cs_dsp_can_emit_message() and macros down to only the call to dev_xxx().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260310130343.1791951-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/cs_dsp.c
drivers/firmware/cirrus/cs_dsp.h
drivers/firmware/cirrus/test/cs_dsp_test_bin.c
drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c
drivers/firmware/cirrus/test/cs_dsp_test_wmfw.c
drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c

index f9d8a883900d8a8a1f0b727ddd4b5dbc5096929d..39e7e1db8eed5bbe7ec32582dbc166c32bc36a7a 100644 (file)
@@ -9,6 +9,7 @@
  *                         Cirrus Logic International Semiconductor Ltd.
  */
 
+#include <kunit/static_stub.h>
 #include <kunit/visibility.h>
 #include <linux/cleanup.h>
 #include <linux/ctype.h>
@@ -18,6 +19,7 @@
 #include <linux/minmax.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/ratelimit.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 /*
  * When the KUnit test is running the error-case tests will cause a lot
  * of messages. Rate-limit to prevent overflowing the kernel log buffer
- * during KUnit test runs.
+ * during KUnit test runs and allow the test to redirect this function.
+ * In normal (not KUnit) builds this collapses to only return true.
  */
-#if IS_ENABLED(CONFIG_FW_CS_DSP_KUNIT_TEST)
-bool cs_dsp_suppress_err_messages;
-EXPORT_SYMBOL_IF_KUNIT(cs_dsp_suppress_err_messages);
+VISIBLE_IF_KUNIT bool cs_dsp_can_emit_message(void)
+{
+       KUNIT_STATIC_STUB_REDIRECT(cs_dsp_can_emit_message);
 
-bool cs_dsp_suppress_warn_messages;
-EXPORT_SYMBOL_IF_KUNIT(cs_dsp_suppress_warn_messages);
+       if (IS_ENABLED(CONFIG_FW_CS_DSP_KUNIT_TEST)) {
+               static DEFINE_RATELIMIT_STATE(_rs,
+                                             DEFAULT_RATELIMIT_INTERVAL,
+                                             DEFAULT_RATELIMIT_BURST);
+               return __ratelimit(&_rs);
+       }
 
-bool cs_dsp_suppress_info_messages;
-EXPORT_SYMBOL_IF_KUNIT(cs_dsp_suppress_info_messages);
+       return true;
+}
+EXPORT_SYMBOL_IF_KUNIT(cs_dsp_can_emit_message);
 
-#define cs_dsp_err(_dsp, fmt, ...) \
-       do { \
-               if (!cs_dsp_suppress_err_messages) \
-                       dev_err_ratelimited(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
+#define cs_dsp_err(_dsp, fmt, ...)                                                \
+       do {                                                                       \
+               if (cs_dsp_can_emit_message())                                     \
+                       dev_err(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
        } while (false)
-#define cs_dsp_warn(_dsp, fmt, ...) \
-       do { \
-               if (!cs_dsp_suppress_warn_messages) \
-                       dev_warn_ratelimited(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
+
+#define cs_dsp_warn(_dsp, fmt, ...)                                                \
+       do {                                                                        \
+               if (cs_dsp_can_emit_message())                                      \
+                       dev_warn(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
        } while (false)
-#define cs_dsp_info(_dsp, fmt, ...) \
-       do { \
-               if (!cs_dsp_suppress_info_messages) \
-                       dev_info_ratelimited(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
+
+#define cs_dsp_info(_dsp, fmt, ...)                                                \
+       do {                                                                        \
+               if (cs_dsp_can_emit_message())                                      \
+                       dev_info(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
+       } while (false)
+
+#define cs_dsp_dbg(_dsp, fmt, ...)                                                \
+       do {                                                                       \
+               if (cs_dsp_can_emit_message())                                     \
+                       dev_dbg(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__); \
        } while (false)
-#define cs_dsp_dbg(_dsp, fmt, ...) \
-       dev_dbg_ratelimited(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#else
-#define cs_dsp_err(_dsp, fmt, ...) \
-       dev_err(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#define cs_dsp_warn(_dsp, fmt, ...) \
-       dev_warn(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#define cs_dsp_info(_dsp, fmt, ...) \
-       dev_info(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#define cs_dsp_dbg(_dsp, fmt, ...) \
-       dev_dbg(_dsp->dev, "%s: " fmt, _dsp->name, ##__VA_ARGS__)
-#endif
 
 #define ADSP1_CONTROL_1                   0x00
 #define ADSP1_CONTROL_2                   0x02
index adf543004aea315c8c1121107ba41f5afc519835..04d768d08d033b30447c8ae41b777437f782e709 100644 (file)
@@ -10,9 +10,7 @@
 #define FW_CS_DSP_H
 
 #if IS_ENABLED(CONFIG_KUNIT)
-extern bool cs_dsp_suppress_err_messages;
-extern bool cs_dsp_suppress_warn_messages;
-extern bool cs_dsp_suppress_info_messages;
+bool cs_dsp_can_emit_message(void);
 #endif
 
 #endif /* ifndef FW_CS_DSP_H */
index 61078da57462549719e9f7fb7da9377622d926ee..63416838f8653a42b879d2a8eecbb7a5a1092027 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <kunit/device.h>
 #include <kunit/resource.h>
+#include <kunit/static_stub.h>
 #include <kunit/test.h>
 #include <linux/build_bug.h>
 #include <linux/firmware/cirrus/cs_dsp.h>
@@ -2155,6 +2156,15 @@ static void bin_patch_name_and_info(struct kunit *test)
        KUNIT_EXPECT_EQ(test, reg_val, payload_data);
 }
 
+static bool cs_dsp_bin_test_can_emit_message_hook(void)
+{
+#if defined(DEBUG)
+       return true;
+#else
+       return false;
+#endif
+}
+
 static int cs_dsp_bin_test_common_init(struct kunit *test, struct cs_dsp *dsp,
                                        int wmdr_ver)
 {
@@ -2239,16 +2249,12 @@ static int cs_dsp_bin_test_common_init(struct kunit *test, struct cs_dsp *dsp,
         * The large number of test cases will cause an unusually large amount
         * of dev_info() messages from cs_dsp, so suppress these.
         */
-       cs_dsp_suppress_info_messages = true;
+       kunit_activate_static_stub(test, cs_dsp_can_emit_message,
+                                  cs_dsp_bin_test_can_emit_message_hook);
 
        return 0;
 }
 
-static void cs_dsp_bin_test_exit(struct kunit *test)
-{
-       cs_dsp_suppress_info_messages = false;
-}
-
 static int cs_dsp_bin_test_halo_init_common(struct kunit *test, int wmdr_ver)
 {
        struct cs_dsp *dsp;
@@ -2833,7 +2839,6 @@ static struct kunit_case cs_dsp_bin_test_cases_adsp2[] = {
 static struct kunit_suite cs_dsp_bin_test_halo = {
        .name = "cs_dsp_bin_halo",
        .init = cs_dsp_bin_test_halo_init,
-       .exit = cs_dsp_bin_test_exit,
        .test_cases = cs_dsp_bin_test_cases_halo,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2848,7 +2853,6 @@ static struct kunit_suite cs_dsp_bin_test_halo_wmdr3 = {
 static struct kunit_suite cs_dsp_bin_test_adsp2_32bit = {
        .name = "cs_dsp_bin_adsp2_32bit",
        .init = cs_dsp_bin_test_adsp2_32bit_init,
-       .exit = cs_dsp_bin_test_exit,
        .test_cases = cs_dsp_bin_test_cases_adsp2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2856,7 +2860,6 @@ static struct kunit_suite cs_dsp_bin_test_adsp2_32bit = {
 static struct kunit_suite cs_dsp_bin_test_adsp2_16bit = {
        .name = "cs_dsp_bin_adsp2_16bit",
        .init = cs_dsp_bin_test_adsp2_16bit_init,
-       .exit = cs_dsp_bin_test_exit,
        .test_cases = cs_dsp_bin_test_cases_adsp2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
index 888e277a265cbdab8051fd157a41f137bef81aa6..f879c5467c98aacd3ee1a4efae5cbefbb0887ce3 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <kunit/device.h>
 #include <kunit/resource.h>
+#include <kunit/static_stub.h>
 #include <kunit/test.h>
 #include <linux/build_bug.h>
 #include <linux/firmware/cirrus/cs_dsp.h>
@@ -380,11 +381,13 @@ static void bin_block_payload_len_garbage(struct kunit *test)
                        0);
 }
 
-static void cs_dsp_bin_err_test_exit(struct kunit *test)
+static bool cs_dsp_bin_err_test_can_emit_message_hook(void)
 {
-       cs_dsp_suppress_err_messages = false;
-       cs_dsp_suppress_warn_messages = false;
-       cs_dsp_suppress_info_messages = false;
+#if defined(DEBUG)
+       return true;
+#else
+       return false;
+#endif
 }
 
 static int cs_dsp_bin_err_test_common_init(struct kunit *test, struct cs_dsp *dsp,
@@ -482,9 +485,8 @@ static int cs_dsp_bin_err_test_common_init(struct kunit *test, struct cs_dsp *ds
         * Testing error conditions can produce a lot of log output
         * from cs_dsp error messages, so suppress messages.
         */
-       cs_dsp_suppress_err_messages = true;
-       cs_dsp_suppress_warn_messages = true;
-       cs_dsp_suppress_info_messages = true;
+       kunit_activate_static_stub(test, cs_dsp_can_emit_message,
+                                  cs_dsp_bin_err_test_can_emit_message_hook);
 
        return 0;
 }
@@ -584,7 +586,6 @@ static struct kunit_case cs_dsp_bin_err_test_cases[] = {
 static struct kunit_suite cs_dsp_bin_err_test_halo = {
        .name = "cs_dsp_bin_err_halo",
        .init = cs_dsp_bin_err_test_halo_init,
-       .exit = cs_dsp_bin_err_test_exit,
        .test_cases = cs_dsp_bin_err_test_cases,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -592,7 +593,6 @@ static struct kunit_suite cs_dsp_bin_err_test_halo = {
 static struct kunit_suite cs_dsp_bin_err_test_adsp2_32bit = {
        .name = "cs_dsp_bin_err_adsp2_32bit",
        .init = cs_dsp_bin_err_test_adsp2_32bit_init,
-       .exit = cs_dsp_bin_err_test_exit,
        .test_cases = cs_dsp_bin_err_test_cases,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -600,7 +600,6 @@ static struct kunit_suite cs_dsp_bin_err_test_adsp2_32bit = {
 static struct kunit_suite cs_dsp_bin_err_test_adsp2_16bit = {
        .name = "cs_dsp_bin_err_adsp2_16bit",
        .init = cs_dsp_bin_err_test_adsp2_16bit_init,
-       .exit = cs_dsp_bin_err_test_exit,
        .test_cases = cs_dsp_bin_err_test_cases,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
index 788458d5a2876cd8fd7fa92af6af24e131a186fa..1de70e81a8687d3cdc53e8eb8d09dcd9ce4f95cf 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <kunit/device.h>
 #include <kunit/resource.h>
+#include <kunit/static_stub.h>
 #include <kunit/test.h>
 #include <linux/build_bug.h>
 #include <linux/firmware/cirrus/cs_dsp.h>
@@ -1775,6 +1776,15 @@ static void wmfw_load_with_info(struct kunit *test)
        KUNIT_EXPECT_MEMEQ(test, readback, payload_data, payload_size_bytes);
 }
 
+static bool cs_dsp_wmfw_test_can_emit_message_hook(void)
+{
+#if defined(DEBUG)
+       return true;
+#else
+       return false;
+#endif
+}
+
 static int cs_dsp_wmfw_test_common_init(struct kunit *test, struct cs_dsp *dsp,
                                        int wmfw_version)
 {
@@ -1863,16 +1873,12 @@ static int cs_dsp_wmfw_test_common_init(struct kunit *test, struct cs_dsp *dsp,
         * The large number of test cases will cause an unusually large amount
         * of dev_info() messages from cs_dsp, so suppress these.
         */
-       cs_dsp_suppress_info_messages = true;
+       kunit_activate_static_stub(test, cs_dsp_can_emit_message,
+                                  cs_dsp_wmfw_test_can_emit_message_hook);
 
        return 0;
 }
 
-static void cs_dsp_wmfw_test_exit(struct kunit *test)
-{
-       cs_dsp_suppress_info_messages = false;
-}
-
 static int cs_dsp_wmfw_test_halo_init(struct kunit *test)
 {
        struct cs_dsp *dsp;
@@ -2180,7 +2186,6 @@ static struct kunit_case cs_dsp_wmfw_test_cases_adsp2[] = {
 static struct kunit_suite cs_dsp_wmfw_test_halo = {
        .name = "cs_dsp_wmfwV3_halo",
        .init = cs_dsp_wmfw_test_halo_init,
-       .exit = cs_dsp_wmfw_test_exit,
        .test_cases = cs_dsp_wmfw_test_cases_halo,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2188,7 +2193,6 @@ static struct kunit_suite cs_dsp_wmfw_test_halo = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw0 = {
        .name = "cs_dsp_wmfwV0_adsp2_32bit",
        .init = cs_dsp_wmfw_test_adsp2_32bit_wmfw0_init,
-       .exit = cs_dsp_wmfw_test_exit,
        .test_cases = cs_dsp_wmfw_test_cases_adsp2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2196,7 +2200,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw0 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw1 = {
        .name = "cs_dsp_wmfwV1_adsp2_32bit",
        .init = cs_dsp_wmfw_test_adsp2_32bit_wmfw1_init,
-       .exit = cs_dsp_wmfw_test_exit,
        .test_cases = cs_dsp_wmfw_test_cases_adsp2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2204,7 +2207,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw1 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw2 = {
        .name = "cs_dsp_wmfwV2_adsp2_32bit",
        .init = cs_dsp_wmfw_test_adsp2_32bit_wmfw2_init,
-       .exit = cs_dsp_wmfw_test_exit,
        .test_cases = cs_dsp_wmfw_test_cases_adsp2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2212,7 +2214,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw2 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw0 = {
        .name = "cs_dsp_wmfwV0_adsp2_16bit",
        .init = cs_dsp_wmfw_test_adsp2_16bit_wmfw0_init,
-       .exit = cs_dsp_wmfw_test_exit,
        .test_cases = cs_dsp_wmfw_test_cases_adsp2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2220,7 +2221,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw0 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw1 = {
        .name = "cs_dsp_wmfwV1_adsp2_16bit",
        .init = cs_dsp_wmfw_test_adsp2_16bit_wmfw1_init,
-       .exit = cs_dsp_wmfw_test_exit,
        .test_cases = cs_dsp_wmfw_test_cases_adsp2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -2228,7 +2228,6 @@ static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw1 = {
 static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw2 = {
        .name = "cs_dsp_wmfwV2_adsp2_16bit",
        .init = cs_dsp_wmfw_test_adsp2_16bit_wmfw2_init,
-       .exit = cs_dsp_wmfw_test_exit,
        .test_cases = cs_dsp_wmfw_test_cases_adsp2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
index 79eee89a7fd549a6674d4a44a8105b5d7f7a72cc..e7bf5dc474f5913b100bd37c7b5ea2afabb13fa7 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <kunit/device.h>
 #include <kunit/resource.h>
+#include <kunit/static_stub.h>
 #include <kunit/test.h>
 #include <linux/build_bug.h>
 #include <linux/firmware/cirrus/cs_dsp.h>
@@ -989,11 +990,13 @@ static void wmfw_v2_coeff_description_exceeds_block(struct kunit *test)
                        -EOVERFLOW);
 }
 
-static void cs_dsp_wmfw_err_test_exit(struct kunit *test)
+static bool cs_dsp_wmfw_err_test_can_emit_message_hook(void)
 {
-       cs_dsp_suppress_err_messages = false;
-       cs_dsp_suppress_warn_messages = false;
-       cs_dsp_suppress_info_messages = false;
+#if defined(DEBUG)
+       return true;
+#else
+       return false;
+#endif
 }
 
 static int cs_dsp_wmfw_err_test_common_init(struct kunit *test, struct cs_dsp *dsp,
@@ -1080,9 +1083,8 @@ static int cs_dsp_wmfw_err_test_common_init(struct kunit *test, struct cs_dsp *d
         * Testing error conditions can produce a lot of log output
         * from cs_dsp error messages, so suppress messages.
         */
-       cs_dsp_suppress_err_messages = true;
-       cs_dsp_suppress_warn_messages = true;
-       cs_dsp_suppress_info_messages = true;
+       kunit_activate_static_stub(test, cs_dsp_can_emit_message,
+                                  cs_dsp_wmfw_err_test_can_emit_message_hook);
 
        return 0;
 }
@@ -1304,7 +1306,6 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v3[] = {
 static struct kunit_suite cs_dsp_wmfw_err_test_halo = {
        .name = "cs_dsp_wmfwV3_err_halo",
        .init = cs_dsp_wmfw_err_test_halo_init,
-       .exit = cs_dsp_wmfw_err_test_exit,
        .test_cases = cs_dsp_wmfw_err_test_cases_v3,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1312,7 +1313,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_halo = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw0 = {
        .name = "cs_dsp_wmfwV0_err_adsp2_32bit",
        .init = cs_dsp_wmfw_err_test_adsp2_32bit_wmfw0_init,
-       .exit = cs_dsp_wmfw_err_test_exit,
        .test_cases = cs_dsp_wmfw_err_test_cases_v0,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1320,7 +1320,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw0 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw1 = {
        .name = "cs_dsp_wmfwV1_err_adsp2_32bit",
        .init = cs_dsp_wmfw_err_test_adsp2_32bit_wmfw1_init,
-       .exit = cs_dsp_wmfw_err_test_exit,
        .test_cases = cs_dsp_wmfw_err_test_cases_v1,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1328,7 +1327,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw1 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw2 = {
        .name = "cs_dsp_wmfwV2_err_adsp2_32bit",
        .init = cs_dsp_wmfw_err_test_adsp2_32bit_wmfw2_init,
-       .exit = cs_dsp_wmfw_err_test_exit,
        .test_cases = cs_dsp_wmfw_err_test_cases_v2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1336,7 +1334,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_32bit_wmfw2 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw0 = {
        .name = "cs_dsp_wmfwV0_err_adsp2_16bit",
        .init = cs_dsp_wmfw_err_test_adsp2_16bit_wmfw0_init,
-       .exit = cs_dsp_wmfw_err_test_exit,
        .test_cases = cs_dsp_wmfw_err_test_cases_v0,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1344,7 +1341,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw0 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw1 = {
        .name = "cs_dsp_wmfwV1_err_adsp2_16bit",
        .init = cs_dsp_wmfw_err_test_adsp2_16bit_wmfw1_init,
-       .exit = cs_dsp_wmfw_err_test_exit,
        .test_cases = cs_dsp_wmfw_err_test_cases_v1,
        .attr.speed = KUNIT_SPEED_SLOW,
 };
@@ -1352,7 +1348,6 @@ static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw1 = {
 static struct kunit_suite cs_dsp_wmfw_err_test_adsp2_16bit_wmfw2 = {
        .name = "cs_dsp_wmfwV2_err_adsp2_16bit",
        .init = cs_dsp_wmfw_err_test_adsp2_16bit_wmfw2_init,
-       .exit = cs_dsp_wmfw_err_test_exit,
        .test_cases = cs_dsp_wmfw_err_test_cases_v2,
        .attr.speed = KUNIT_SPEED_SLOW,
 };