|
18 | 18 | #include <linux/string.h> |
19 | 19 | #include <linux/vmalloc.h> |
20 | 20 |
|
| 21 | +#include "../cs_dsp.h" |
| 22 | + |
21 | 23 | /* |
22 | 24 | * Test method is: |
23 | 25 | * |
@@ -1853,7 +1855,22 @@ static int cs_dsp_wmfw_test_common_init(struct kunit *test, struct cs_dsp *dsp, |
1853 | 1855 | return ret; |
1854 | 1856 |
|
1855 | 1857 | /* Automatically call cs_dsp_remove() when test case ends */ |
1856 | | - return kunit_add_action_or_reset(priv->test, _cs_dsp_remove_wrapper, dsp); |
| 1858 | + ret = kunit_add_action_or_reset(priv->test, _cs_dsp_remove_wrapper, dsp); |
| 1859 | + if (ret) |
| 1860 | + return ret; |
| 1861 | + |
| 1862 | + /* |
| 1863 | + * The large number of test cases will cause an unusually large amount |
| 1864 | + * of dev_info() messages from cs_dsp, so suppress these. |
| 1865 | + */ |
| 1866 | + cs_dsp_suppress_info_messages = true; |
| 1867 | + |
| 1868 | + return 0; |
| 1869 | +} |
| 1870 | + |
| 1871 | +static void cs_dsp_wmfw_test_exit(struct kunit *test) |
| 1872 | +{ |
| 1873 | + cs_dsp_suppress_info_messages = false; |
1857 | 1874 | } |
1858 | 1875 |
|
1859 | 1876 | static int cs_dsp_wmfw_test_halo_init(struct kunit *test) |
@@ -2163,42 +2180,49 @@ static struct kunit_case cs_dsp_wmfw_test_cases_adsp2[] = { |
2163 | 2180 | static struct kunit_suite cs_dsp_wmfw_test_halo = { |
2164 | 2181 | .name = "cs_dsp_wmfwV3_halo", |
2165 | 2182 | .init = cs_dsp_wmfw_test_halo_init, |
| 2183 | + .exit = cs_dsp_wmfw_test_exit, |
2166 | 2184 | .test_cases = cs_dsp_wmfw_test_cases_halo, |
2167 | 2185 | }; |
2168 | 2186 |
|
2169 | 2187 | static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw0 = { |
2170 | 2188 | .name = "cs_dsp_wmfwV0_adsp2_32bit", |
2171 | 2189 | .init = cs_dsp_wmfw_test_adsp2_32bit_wmfw0_init, |
| 2190 | + .exit = cs_dsp_wmfw_test_exit, |
2172 | 2191 | .test_cases = cs_dsp_wmfw_test_cases_adsp2, |
2173 | 2192 | }; |
2174 | 2193 |
|
2175 | 2194 | static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw1 = { |
2176 | 2195 | .name = "cs_dsp_wmfwV1_adsp2_32bit", |
2177 | 2196 | .init = cs_dsp_wmfw_test_adsp2_32bit_wmfw1_init, |
| 2197 | + .exit = cs_dsp_wmfw_test_exit, |
2178 | 2198 | .test_cases = cs_dsp_wmfw_test_cases_adsp2, |
2179 | 2199 | }; |
2180 | 2200 |
|
2181 | 2201 | static struct kunit_suite cs_dsp_wmfw_test_adsp2_32bit_wmfw2 = { |
2182 | 2202 | .name = "cs_dsp_wmfwV2_adsp2_32bit", |
2183 | 2203 | .init = cs_dsp_wmfw_test_adsp2_32bit_wmfw2_init, |
| 2204 | + .exit = cs_dsp_wmfw_test_exit, |
2184 | 2205 | .test_cases = cs_dsp_wmfw_test_cases_adsp2, |
2185 | 2206 | }; |
2186 | 2207 |
|
2187 | 2208 | static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw0 = { |
2188 | 2209 | .name = "cs_dsp_wmfwV0_adsp2_16bit", |
2189 | 2210 | .init = cs_dsp_wmfw_test_adsp2_16bit_wmfw0_init, |
| 2211 | + .exit = cs_dsp_wmfw_test_exit, |
2190 | 2212 | .test_cases = cs_dsp_wmfw_test_cases_adsp2, |
2191 | 2213 | }; |
2192 | 2214 |
|
2193 | 2215 | static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw1 = { |
2194 | 2216 | .name = "cs_dsp_wmfwV1_adsp2_16bit", |
2195 | 2217 | .init = cs_dsp_wmfw_test_adsp2_16bit_wmfw1_init, |
| 2218 | + .exit = cs_dsp_wmfw_test_exit, |
2196 | 2219 | .test_cases = cs_dsp_wmfw_test_cases_adsp2, |
2197 | 2220 | }; |
2198 | 2221 |
|
2199 | 2222 | static struct kunit_suite cs_dsp_wmfw_test_adsp2_16bit_wmfw2 = { |
2200 | 2223 | .name = "cs_dsp_wmfwV2_adsp2_16bit", |
2201 | 2224 | .init = cs_dsp_wmfw_test_adsp2_16bit_wmfw2_init, |
| 2225 | + .exit = cs_dsp_wmfw_test_exit, |
2202 | 2226 | .test_cases = cs_dsp_wmfw_test_cases_adsp2, |
2203 | 2227 | }; |
2204 | 2228 |
|
|
0 commit comments