workqueue_tc.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. /*
  2. * Copyright (c) 2006-2024, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-02-06 tyx first commit
  9. * 2024-12-31 rbb666 Adding Test Cases
  10. * 2025-11-16 ChuanN-sudo add standardized utest documentation block
  11. */
  12. /**
  13. * Test Case Name: IPC Workqueue Test
  14. *
  15. * Test Objectives:
  16. * - Validate rt_workqueue creation, task submission, and execution mechanisms.
  17. * - Verify ordered execution of work items under concurrent submission scenarios.
  18. * - Ensure proper handling of task dependencies and resource cleanup during workqueue termination.
  19. * - Test core APIs: rt_workqueue_create(), rt_workqueue_submit(), rt_workqueue_cancel()
  20. *
  21. * Test Scenarios:
  22. * - Multiple threads submit periodic work items with varying delays to simulate real-world workloads.
  23. * - Workqueue processes tasks in FIFO order while handling dynamic task cancellations.
  24. * - Test injects random scheduling delays and priority inversions to stress-test queue stability.
  25. * - Concurrent submission of high-priority and normal-priority work items to verify scheduling fairness.
  26. * - System triggers asynchronous workqueue destruction during active task processing.
  27. *
  28. * Verification Metrics:
  29. * - Submitted work items execute exactly once with correct parameter context.
  30. * - Task execution order preserves submission sequence under normal scheduling conditions.
  31. * - Cancelled tasks are safely removed from queue without execution or memory leaks.
  32. * - Workqueue resource cleanup completes successfully even with pending operations.
  33. * - Asynchronous destruction of workqueue handles active tasks gracefully without corruption.
  34. *
  35. * Dependencies:
  36. * - Hardware requirements: QEMU emulator or any hardware platform that supports RT-Thread.
  37. * - Software configuration:
  38. * - RT_USING_UTEST must be enabled (select "RT-Thread Utestcases" in menuconfig).
  39. * - RT_UTEST_WORKQUEUE must be enabled (enable via: RT-Thread Utestcases -> Kernel Components -> Drivers -> IPC Test -> IPC Workqueue Test).
  40. * - Environmental Assumptions: System scheduler working normally.
  41. *
  42. * Expected Results:
  43. * - Final output: "[ PASSED ] [ result ] testcase (components.drivers.ipc.workqueue_tc)"
  44. * - No memory leaks or race condition detections in logs.
  45. * - No assertions triggered during test execution.
  46. */
  47. #include "rtthread.h"
  48. #include "rtdevice.h"
  49. #include "utest.h"
  50. #ifdef RT_USING_DEVICE_IPC
  51. static rt_uint8_t get_test_thread_priority(rt_int8_t pos)
  52. {
  53. rt_int16_t priority;
  54. priority = RT_SCHED_PRIV(rt_thread_self()).init_priority;
  55. if (pos == 0)
  56. {
  57. return priority;
  58. }
  59. else
  60. {
  61. priority += pos;
  62. }
  63. if (priority < 0)
  64. {
  65. return 0;
  66. }
  67. else if (priority >= RT_THREAD_PRIORITY_MAX)
  68. {
  69. return RT_THREAD_PRIORITY_MAX - 1;
  70. }
  71. else
  72. {
  73. return (rt_uint8_t)priority;
  74. }
  75. }
  76. static void do_work_test_fun(struct rt_work *work, void *work_data)
  77. {
  78. *((int *)work_data) = 1;
  79. }
  80. static void do_work_test(void)
  81. {
  82. struct rt_workqueue *queue;
  83. rt_uint8_t curr_priority;
  84. struct rt_work work;
  85. volatile int work_flag = 0;
  86. rt_err_t err;
  87. /* 1 higher priority than the current test thread */
  88. curr_priority = get_test_thread_priority(-1);
  89. queue = rt_workqueue_create("test", 2048, curr_priority);
  90. if (queue == RT_NULL)
  91. {
  92. LOG_E("queue create failed, L:%d", __LINE__);
  93. return;
  94. }
  95. rt_work_init(&work, do_work_test_fun, (void *)&work_flag);
  96. err = rt_workqueue_submit_work(queue, &work, 0);
  97. uassert_int_equal(err, RT_EOK);
  98. /* Delay 5 ticks to ensure that the task has been executed */
  99. rt_thread_delay(5);
  100. uassert_int_equal(work_flag, 1);
  101. rt_thread_delay(100);
  102. rt_workqueue_destroy(queue);
  103. }
  104. static void do_delay_work_test_fun(struct rt_work *work, void *work_data)
  105. {
  106. *((rt_tick_t *)work_data) = rt_tick_get();
  107. }
  108. static void do_delay_work_test(void)
  109. {
  110. struct rt_workqueue *queue;
  111. rt_uint8_t curr_priority;
  112. struct rt_work work;
  113. volatile rt_tick_t work_start = 0;
  114. volatile rt_tick_t work_end = 0;
  115. rt_err_t err;
  116. /* 1 higher priority than the current test thread */
  117. curr_priority = get_test_thread_priority(-1);
  118. queue = rt_workqueue_create("test", 2048, curr_priority);
  119. if (queue == RT_NULL)
  120. {
  121. LOG_E("queue create failed, L:%d", __LINE__);
  122. return;
  123. }
  124. rt_work_init(&work, do_delay_work_test_fun, (void *)&work_end);
  125. work_start = rt_tick_get();
  126. /* Normal delayed work submission test */
  127. err = rt_workqueue_submit_work(queue, &work, 10);
  128. uassert_int_equal(err, RT_EOK);
  129. /* Ensure that the delayed work has been executed */
  130. rt_thread_delay(15);
  131. /* Check if the delayed task is executed after 10 ticks */
  132. if (work_end < work_start || work_end - work_start < 10)
  133. {
  134. uassert_false(1);
  135. }
  136. rt_thread_delay(100);
  137. rt_workqueue_destroy(queue);
  138. }
  139. static void cancle_work_test01_fun(struct rt_work *work, void *work_data)
  140. {
  141. *((int *)work_data) = 1;
  142. }
  143. static void cancle_work_test01(void)
  144. {
  145. struct rt_workqueue *queue;
  146. rt_uint8_t curr_priority;
  147. struct rt_work work;
  148. volatile int work_flag = 0;
  149. rt_err_t err;
  150. /* 1 lower priority than the current test thread */
  151. curr_priority = get_test_thread_priority(1);
  152. queue = rt_workqueue_create("test", 2048, curr_priority);
  153. if (queue == RT_NULL)
  154. {
  155. LOG_E("queue create failed, L:%d", __LINE__);
  156. return;
  157. }
  158. work_flag = 0;
  159. rt_work_init(&work, cancle_work_test01_fun, (void *)&work_flag);
  160. /* Cancel the work before it is executed */
  161. err = rt_workqueue_submit_work(queue, &work, 0);
  162. uassert_int_equal(err, RT_EOK);
  163. /* Cancel Now */
  164. err = rt_workqueue_cancel_work(queue, &work);
  165. uassert_int_equal(err, RT_EOK);
  166. rt_thread_delay(5);
  167. uassert_int_equal(work_flag, 0);
  168. rt_thread_delay(100);
  169. rt_workqueue_destroy(queue);
  170. }
  171. static void cancle_work_test02_fun(struct rt_work *work, void *work_data)
  172. {
  173. rt_thread_delay(10);
  174. }
  175. static void cancle_work_test02(void)
  176. {
  177. struct rt_workqueue *queue;
  178. rt_uint8_t curr_priority;
  179. struct rt_work work;
  180. rt_err_t err;
  181. /* 1 higher priority than the current test thread */
  182. curr_priority = get_test_thread_priority(-1);
  183. queue = rt_workqueue_create("test", 2048, curr_priority);
  184. if (queue == RT_NULL)
  185. {
  186. LOG_E("queue create failed, L:%d", __LINE__);
  187. return;
  188. }
  189. rt_work_init(&work, cancle_work_test02_fun, RT_NULL);
  190. /* Cancel the work while it is in progress */
  191. err = rt_workqueue_submit_work(queue, &work, 0);
  192. uassert_int_equal(err, RT_EOK);
  193. rt_thread_delay(5);
  194. err = rt_workqueue_cancel_work(queue, &work);
  195. uassert_int_equal(err, -RT_EBUSY);
  196. rt_thread_delay(100);
  197. rt_workqueue_destroy(queue);
  198. }
  199. static void cancle_work_test03_fun(struct rt_work *work, void *work_data)
  200. {
  201. rt_thread_delay(5);
  202. }
  203. static void cancle_work_test03(void)
  204. {
  205. struct rt_workqueue *queue;
  206. rt_uint8_t curr_priority;
  207. struct rt_work work;
  208. rt_err_t err;
  209. /* 1 lower priority than the current test thread */
  210. curr_priority = get_test_thread_priority(1);
  211. queue = rt_workqueue_create("test", 2048, curr_priority);
  212. if (queue == RT_NULL)
  213. {
  214. LOG_E("queue create failed, L:%d", __LINE__);
  215. return;
  216. }
  217. rt_work_init(&work, cancle_work_test03_fun, RT_NULL);
  218. /* Canceling a work after it has been executed */
  219. err = rt_workqueue_submit_work(queue, &work, 0);
  220. uassert_int_equal(err, RT_EOK);
  221. rt_thread_delay(10);
  222. err = rt_workqueue_cancel_work(queue, &work);
  223. uassert_int_equal(err, RT_EOK);
  224. rt_thread_delay(100);
  225. rt_workqueue_destroy(queue);
  226. }
  227. static void cancle_work_test04_fun(struct rt_work *work, void *work_data)
  228. {
  229. rt_thread_delay(10);
  230. *((int *)work_data) = 1;
  231. }
  232. static void cancle_work_test04(void)
  233. {
  234. struct rt_workqueue *queue;
  235. rt_uint8_t curr_priority;
  236. struct rt_work work;
  237. volatile int work_flag = 0;
  238. rt_err_t err;
  239. /* 1 lower priority than the current test thread */
  240. curr_priority = get_test_thread_priority(1);
  241. queue = rt_workqueue_create("test", 2048, curr_priority);
  242. if (queue == RT_NULL)
  243. {
  244. LOG_E("queue create failed, L:%d", __LINE__);
  245. return;
  246. }
  247. rt_work_init(&work, cancle_work_test04_fun, (void *)&work_flag);
  248. err = rt_workqueue_submit_work(queue, &work, 0);
  249. uassert_int_equal(err, RT_EOK);
  250. rt_thread_delay(5);
  251. /* Synchronized cancellation work */
  252. err = rt_workqueue_cancel_work_sync(queue, &work);
  253. uassert_int_equal(err, RT_EOK);
  254. uassert_int_equal(work_flag, 1);
  255. rt_thread_delay(100);
  256. rt_workqueue_destroy(queue);
  257. }
  258. static void cancle_delay_work_test01_fun(struct rt_work *work, void *work_data)
  259. {
  260. *((int *)work_data) = 1;
  261. }
  262. static void cancle_delay_work_test01(void)
  263. {
  264. struct rt_workqueue *queue;
  265. rt_uint8_t curr_priority;
  266. struct rt_work work;
  267. volatile int work_flag = 0;
  268. rt_err_t err;
  269. /* 1 lower priority than the current test thread */
  270. curr_priority = get_test_thread_priority(1);
  271. queue = rt_workqueue_create("test", 2048, curr_priority);
  272. if (queue == RT_NULL)
  273. {
  274. LOG_E("queue create failed, L:%d", __LINE__);
  275. return;
  276. }
  277. work_flag = 0;
  278. rt_work_init(&work, cancle_delay_work_test01_fun, (void *)&work_flag);
  279. err = rt_workqueue_submit_work(queue, &work, 20);
  280. uassert_int_equal(err, RT_EOK);
  281. rt_thread_delay(10);
  282. /* Cancel work */
  283. err = rt_workqueue_cancel_work(queue, &work);
  284. uassert_int_equal(err, RT_EOK);
  285. rt_thread_delay(15);
  286. uassert_int_equal(work_flag, 0);
  287. rt_thread_delay(100);
  288. rt_workqueue_destroy(queue);
  289. }
  290. static void repeat_work_test01_fun(struct rt_work *work, void *work_data)
  291. {
  292. *((int *)work_data) += 1;
  293. }
  294. static void repeat_work_test01(void)
  295. {
  296. struct rt_workqueue *queue;
  297. rt_uint8_t curr_priority;
  298. struct rt_work work;
  299. volatile int work_flag = 0;
  300. rt_err_t err;
  301. /* 1 lower priority than the current test thread */
  302. curr_priority = get_test_thread_priority(1);
  303. queue = rt_workqueue_create("test01", 2048, curr_priority);
  304. if (queue == RT_NULL)
  305. {
  306. LOG_E("queue create failed, L:%d", __LINE__);
  307. return;
  308. }
  309. work_flag = 0;
  310. rt_work_init(&work, repeat_work_test01_fun, (void *)&work_flag);
  311. /* Multiple submissions of the same work */
  312. err = rt_workqueue_submit_work(queue, &work, 0);
  313. uassert_int_equal(err, RT_EOK);
  314. /* The same work, before it is executed, can be submitted repeatedly and executed only once */
  315. err = rt_workqueue_submit_work(queue, &work, 0);
  316. if (err != RT_EOK)
  317. {
  318. LOG_E("L:%d err. %d", __LINE__, err);
  319. }
  320. rt_thread_delay(10);
  321. /* Check if it was executed only once */
  322. uassert_int_equal(work_flag, 1);
  323. rt_thread_delay(100);
  324. rt_workqueue_destroy(queue);
  325. }
  326. static void repeat_work_test02_fun(struct rt_work *work, void *work_data)
  327. {
  328. rt_thread_delay(10);
  329. *((int *)work_data) += 1;
  330. }
  331. static void repeat_work_test02(void)
  332. {
  333. struct rt_workqueue *queue;
  334. rt_uint8_t curr_priority;
  335. struct rt_work work;
  336. volatile int work_flag = 0;
  337. rt_err_t err;
  338. /* 1 priority higher than current test thread */
  339. curr_priority = get_test_thread_priority(-1);
  340. queue = rt_workqueue_create("test02", 2048, curr_priority);
  341. if (queue == RT_NULL)
  342. {
  343. LOG_E("queue create failed, L:%d", __LINE__);
  344. return;
  345. }
  346. rt_work_init(&work, repeat_work_test02_fun, (void *)&work_flag);
  347. /* Submit work with high queue priority that will be executed immediately */
  348. err = rt_workqueue_submit_work(queue, &work, 0);
  349. uassert_int_equal(err, RT_EOK);
  350. rt_thread_delay(5);
  351. /* Re-submission of work in progress */
  352. err = rt_workqueue_submit_work(queue, &work, 0);
  353. if (err != RT_EOK)
  354. {
  355. LOG_E("L:%d err. %d", __LINE__, err);
  356. }
  357. rt_thread_delay(10);
  358. uassert_int_equal(work_flag, 1);
  359. rt_thread_delay(10);
  360. uassert_int_equal(work_flag, 2);
  361. rt_workqueue_destroy(queue);
  362. }
  363. static struct rt_workqueue *queue_3;
  364. static void repeat_work_test03_fun(struct rt_work *work, void *work_data)
  365. {
  366. int *work_flag = (int *)work_data;
  367. (*work_flag) += 1;
  368. rt_kprintf("work_flag:%d\n", *work_flag);
  369. if (*work_flag < 20)
  370. {
  371. rt_workqueue_submit_work(queue_3, work, 0);
  372. }
  373. }
  374. static void repeat_work_test03(void)
  375. {
  376. rt_uint8_t curr_priority;
  377. struct rt_work work;
  378. volatile int work_flag = 0;
  379. rt_err_t err;
  380. /* 1 priority higher than current test thread */
  381. curr_priority = get_test_thread_priority(-1);
  382. queue_3 = rt_workqueue_create("test03", 2048, curr_priority);
  383. if (queue_3 == RT_NULL)
  384. {
  385. LOG_E("queue create failed, L:%d", __LINE__);
  386. return;
  387. }
  388. rt_work_init(&work, repeat_work_test03_fun, (void *)&work_flag);
  389. /* Submit work with high queue priority that will be executed immediately */
  390. err = rt_workqueue_submit_work(queue_3, &work, 0);
  391. uassert_int_equal(err, RT_EOK);
  392. /* Wait for the work to be executed 20 times with a timeout */
  393. err = rt_workqueue_cancel_work_sync(queue_3, &work);
  394. uassert_int_equal(err, RT_EOK);
  395. /* Check if the work was executed 20 times */
  396. uassert_int_equal(work_flag, 20);
  397. rt_workqueue_destroy(queue_3);
  398. }
  399. static void repeat_delay_work_test01_fun(struct rt_work *work, void *work_data)
  400. {
  401. *((int *)work_data) += 1;
  402. }
  403. static void repeat_delay_work_test01(void)
  404. {
  405. struct rt_workqueue *queue;
  406. rt_uint8_t curr_priority;
  407. struct rt_work work;
  408. volatile int work_flag = 0;
  409. rt_err_t err;
  410. /* 1 lower priority than the current test thread */
  411. curr_priority = get_test_thread_priority(1);
  412. queue = rt_workqueue_create("test", 2048, curr_priority);
  413. if (queue == RT_NULL)
  414. {
  415. LOG_E("queue create failed, L:%d", __LINE__);
  416. return;
  417. }
  418. work_flag = 0;
  419. rt_work_init(&work, repeat_delay_work_test01_fun, (void *)&work_flag);
  420. err = rt_workqueue_submit_work(queue, &work, 20);
  421. uassert_int_equal(err, RT_EOK);
  422. /* At this point the delayed work has not been executed */
  423. rt_thread_delay(10);
  424. /* Re-submission of time-delayed work */
  425. err = rt_workqueue_submit_work(queue, &work, 20);
  426. uassert_int_equal(err, RT_EOK);
  427. rt_thread_delay(15);
  428. uassert_int_equal(work_flag, 0);
  429. /* Waiting for delayed task execution */
  430. rt_thread_delay(15);
  431. uassert_int_equal(work_flag, 1);
  432. rt_thread_delay(100);
  433. rt_workqueue_destroy(queue);
  434. }
  435. static void repeat_delay_work_test02_fun(struct rt_work *work, void *work_data)
  436. {
  437. rt_thread_delay(10);
  438. *((int *)work_data) += 1;
  439. }
  440. static void repeat_delay_work_test02(void)
  441. {
  442. struct rt_workqueue *queue;
  443. rt_uint8_t curr_priority;
  444. struct rt_work work;
  445. volatile int work_flag = 0;
  446. rt_err_t err;
  447. /* 1 lower priority than the current test thread */
  448. curr_priority = get_test_thread_priority(1);
  449. queue = rt_workqueue_create("test", 2048, curr_priority);
  450. if (queue == RT_NULL)
  451. {
  452. LOG_E("queue create failed, L:%d", __LINE__);
  453. return;
  454. }
  455. work_flag = 0;
  456. rt_work_init(&work, repeat_delay_work_test02_fun, (void *)&work_flag);
  457. err = rt_workqueue_submit_work(queue, &work, 20);
  458. uassert_int_equal(err, RT_EOK);
  459. /* Waiting for delayed work execution */
  460. rt_thread_delay(25);
  461. err = rt_workqueue_submit_work(queue, &work, 20);
  462. uassert_int_equal(err, RT_EOK);
  463. /* Check if the delayed work has been run only once */
  464. rt_thread_delay(10);
  465. uassert_int_equal(work_flag, 1);
  466. rt_thread_delay(25);
  467. /* Check if the delayed work is executed twice */
  468. uassert_int_equal(work_flag, 2);
  469. rt_thread_delay(100);
  470. rt_workqueue_destroy(queue);
  471. }
  472. static void cancel_all_work_test_fun(struct rt_work *work, void *work_data)
  473. {
  474. *((int *)work_data) += 1;
  475. }
  476. static void cancel_all_work_test(void)
  477. {
  478. struct rt_workqueue *queue;
  479. rt_uint8_t curr_priority;
  480. struct rt_work work1;
  481. struct rt_work work2;
  482. struct rt_work work3;
  483. struct rt_work work4;
  484. volatile int work_flag = 0;
  485. rt_err_t err;
  486. curr_priority = get_test_thread_priority(1);
  487. queue = rt_workqueue_create("test", 2048, curr_priority);
  488. if (queue == RT_NULL)
  489. {
  490. LOG_E("queue create failed, L:%d", __LINE__);
  491. return;
  492. }
  493. work_flag = 0;
  494. rt_work_init(&work1, cancel_all_work_test_fun, (void *)&work_flag);
  495. rt_work_init(&work2, cancel_all_work_test_fun, (void *)&work_flag);
  496. rt_work_init(&work3, cancel_all_work_test_fun, (void *)&work_flag);
  497. rt_work_init(&work4, cancel_all_work_test_fun, (void *)&work_flag);
  498. err = rt_workqueue_submit_work(queue, &work1, 0);
  499. uassert_int_equal(err, RT_EOK);
  500. err = rt_workqueue_submit_work(queue, &work2, 0);
  501. uassert_int_equal(err, RT_EOK);
  502. err = rt_workqueue_submit_work(queue, &work3, 10);
  503. uassert_int_equal(err, RT_EOK);
  504. err = rt_workqueue_submit_work(queue, &work4, 10);
  505. uassert_int_equal(err, RT_EOK);
  506. err = rt_workqueue_cancel_all_work(queue);
  507. uassert_int_equal(err, RT_EOK);
  508. rt_thread_delay(20);
  509. uassert_int_equal(work_flag, 0);
  510. rt_thread_delay(100);
  511. rt_workqueue_destroy(queue);
  512. }
  513. static rt_err_t utest_tc_init(void)
  514. {
  515. return RT_EOK;
  516. }
  517. static rt_err_t utest_tc_cleanup(void)
  518. {
  519. return RT_EOK;
  520. }
  521. static void testcase(void)
  522. {
  523. /* General work queue test */
  524. UTEST_UNIT_RUN(do_work_test);
  525. /* Delayed work queue test */
  526. UTEST_UNIT_RUN(do_delay_work_test);
  527. /* Cancellation of work prior to implementation */
  528. UTEST_UNIT_RUN(cancle_work_test01);
  529. /* Cancellation of work during execution */
  530. UTEST_UNIT_RUN(cancle_work_test02);
  531. /* Cancellation of work after implementation */
  532. UTEST_UNIT_RUN(cancle_work_test03);
  533. /* Synchronized cancellation of work during execution */
  534. UTEST_UNIT_RUN(cancle_work_test04);
  535. /* Cancel delayed work before execution */
  536. UTEST_UNIT_RUN(cancle_delay_work_test01);
  537. /* Multiple submissions of the same work prior to implementation */
  538. UTEST_UNIT_RUN(repeat_work_test01);
  539. /* Multiple submissions of the same work during execution */
  540. UTEST_UNIT_RUN(repeat_work_test02);
  541. /* Submitting the same task multiple times in a mission */
  542. UTEST_UNIT_RUN(repeat_work_test03);
  543. /* Multiple submissions of the same delayed task before execution */
  544. UTEST_UNIT_RUN(repeat_delay_work_test01);
  545. /* Multiple submissions of the same delayed task during execution */
  546. UTEST_UNIT_RUN(repeat_delay_work_test02);
  547. /* Cancel all works */
  548. UTEST_UNIT_RUN(cancel_all_work_test);
  549. }
  550. UTEST_TC_EXPORT(testcase, "components.drivers.ipc.workqueue_tc", utest_tc_init, utest_tc_cleanup, 300);
  551. #endif