thread_tc.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-09.01 yangjie the firet version
  9. * 2021-10.11 mazhiyuan add idle, yield, suspend, control, priority, delay_until
  10. */
  11. #include <rtthread.h>
  12. #include <stdlib.h>
  13. #include "utest.h"
  14. #define THREAD_STACK_SIZE 512
  15. #define THREAD_TIMESLICE 10
  16. ALIGN(RT_ALIGN_SIZE)
  17. static char thread2_stack[1024];
  18. static struct rt_thread thread2;
  19. #ifdef RT_USING_HEAP
  20. static rt_thread_t tid1 = RT_NULL;
  21. static rt_thread_t tid3 = RT_NULL;
  22. static rt_thread_t tid4 = RT_NULL;
  23. static rt_thread_t tid5 = RT_NULL;
  24. static rt_thread_t tid6 = RT_NULL;
  25. static rt_thread_t tid7 = RT_NULL;
  26. #endif /* RT_USING_HEAP */
  27. static rt_uint32_t tid3_delay_pass_flag = 0;
  28. static rt_uint32_t tid3_finish_flag = 0;
  29. static rt_uint32_t tid4_finish_flag = 0;
  30. static rt_uint32_t tid6_finish_flag = 0;
  31. static rt_uint32_t thread5_source = 0;
  32. #ifndef RT_USING_SMP
  33. static rt_uint32_t thread_yield_flag = 0;
  34. #endif
  35. static rt_uint32_t entry_idle_hook_times = 0;
  36. static rt_thread_t __current_thread;
  37. static rt_uint8_t change_priority;
  38. static rt_uint32_t count = 0;
  39. void thread1_entry(void *param)
  40. {
  41. while (1);
  42. }
  43. static void test_dynamic_thread(void)
  44. {
  45. rt_err_t ret_startup = -RT_ERROR;
  46. rt_err_t ret_delete = -RT_ERROR;
  47. tid1 = rt_thread_create("thread1",
  48. thread1_entry,
  49. (void *)1,
  50. THREAD_STACK_SIZE,
  51. __current_thread->current_priority + 1,
  52. THREAD_TIMESLICE - 5);
  53. if (tid1 == RT_NULL)
  54. {
  55. uassert_false(tid1 == RT_NULL);
  56. goto __exit;
  57. }
  58. ret_startup = rt_thread_startup(tid1);
  59. if (ret_startup != RT_EOK)
  60. {
  61. uassert_false(ret_startup != RT_EOK);
  62. goto __exit;
  63. }
  64. ret_delete = rt_thread_delete(tid1);
  65. if (ret_delete != RT_EOK)
  66. {
  67. uassert_false(ret_delete != RT_EOK);
  68. goto __exit;
  69. }
  70. uassert_true(tid1 != RT_NULL && ret_startup == RT_EOK && ret_delete == RT_EOK);
  71. __exit:
  72. if (tid1 != RT_NULL && ret_delete != RT_EOK)
  73. {
  74. rt_thread_delete(tid1);
  75. }
  76. return;
  77. }
  78. void thread2_entry(void *param)
  79. {
  80. while (1);
  81. }
  82. static void test_static_thread(void)
  83. {
  84. rt_err_t ret_init = -RT_ERROR;
  85. rt_err_t ret_startup = -RT_ERROR;
  86. rt_err_t ret_detach = - RT_ERROR;
  87. ret_init = rt_thread_init(&thread2,
  88. "thread2",
  89. thread2_entry,
  90. (void *)2,
  91. &thread2_stack[0],
  92. sizeof(thread2_stack),
  93. __current_thread->current_priority + 1,
  94. THREAD_TIMESLICE);
  95. if (ret_init != RT_EOK)
  96. {
  97. uassert_false(ret_init != RT_EOK);
  98. goto __exit;
  99. }
  100. ret_startup = rt_thread_startup(&thread2);
  101. if (ret_startup != RT_EOK)
  102. {
  103. uassert_false(ret_startup != RT_EOK);
  104. goto __exit;
  105. }
  106. ret_detach = rt_thread_detach(&thread2);
  107. if (ret_detach != RT_EOK)
  108. {
  109. uassert_false(ret_detach != RT_EOK);
  110. goto __exit;
  111. }
  112. uassert_true(ret_init == RT_EOK && ret_startup == RT_EOK && ret_detach == RT_EOK);
  113. __exit:
  114. if (ret_init == RT_EOK && ret_detach != RT_EOK)
  115. {
  116. rt_thread_detach(&thread2);
  117. }
  118. return;
  119. }
  120. static void thread3_entry(void *parameter)
  121. {
  122. rt_tick_t tick;
  123. tick = rt_tick_get();
  124. rt_thread_delay(15);
  125. if (rt_tick_get() - tick > 16)
  126. {
  127. tid3_finish_flag = 1;
  128. tid3_delay_pass_flag = 0;
  129. return;
  130. }
  131. tid3_delay_pass_flag = 1;
  132. tid3_finish_flag = 1;
  133. }
  134. static void test_thread_delay(void)
  135. {
  136. rt_err_t ret_startup = -RT_ERROR;
  137. tid3 = rt_thread_create("thread3",
  138. thread3_entry,
  139. RT_NULL,
  140. THREAD_STACK_SIZE,
  141. __current_thread->current_priority - 1,
  142. THREAD_TIMESLICE);
  143. if (tid3 == RT_NULL)
  144. {
  145. LOG_E("rt_thread_create failed!");
  146. uassert_false(tid3 == RT_NULL);
  147. goto __exit;
  148. }
  149. ret_startup = rt_thread_startup(tid3);
  150. if (ret_startup != RT_EOK)
  151. {
  152. LOG_E("rt_thread_startup failed!");
  153. uassert_false(1);
  154. goto __exit;
  155. }
  156. while (tid3_finish_flag != 1);
  157. uassert_true(tid3_delay_pass_flag == 1);
  158. __exit:
  159. return;
  160. }
  161. static void idle_hook(void)
  162. {
  163. entry_idle_hook_times ++;
  164. }
  165. static void thread4_entry(void *parameter)
  166. {
  167. rt_uint32_t delay_times = 5;
  168. while (delay_times --)
  169. {
  170. rt_thread_mdelay(300);
  171. }
  172. rt_thread_idle_delhook(idle_hook);
  173. tid4_finish_flag = 1;
  174. }
  175. static void test_idle_hook(void)
  176. {
  177. rt_err_t ret_startup = -RT_ERROR;
  178. rt_thread_idle_sethook(idle_hook);
  179. tid4 = rt_thread_create("thread4",
  180. thread4_entry,
  181. RT_NULL,
  182. THREAD_STACK_SIZE,
  183. __current_thread->current_priority - 1,
  184. THREAD_TIMESLICE);
  185. if (tid4 == RT_NULL)
  186. {
  187. LOG_E("rt_thread_create failed!");
  188. uassert_false(tid4 == RT_NULL);
  189. goto __exit;
  190. }
  191. ret_startup = rt_thread_startup(tid4);
  192. if (ret_startup != RT_EOK)
  193. {
  194. LOG_E("rt_thread_startup failed!");
  195. uassert_false(1);
  196. goto __exit;
  197. }
  198. while (tid4_finish_flag != 1)
  199. {
  200. rt_thread_mdelay(200);
  201. }
  202. uassert_true(entry_idle_hook_times > 0);
  203. __exit:
  204. return;
  205. }
  206. static void thread5_entry(void *parameter)
  207. {
  208. while (1)
  209. {
  210. thread5_source ++;
  211. rt_thread_delay(5);
  212. if (thread5_source == 5)
  213. {
  214. rt_thread_yield();
  215. }
  216. }
  217. }
  218. static void thread6_entry(void *parameter)
  219. {
  220. while (++ thread5_source <= 9);
  221. tid6_finish_flag = 1;
  222. }
  223. static void test_thread_yield(void)
  224. {
  225. rt_err_t ret_startup = -RT_ERROR;
  226. tid5 = rt_thread_create("thread5",
  227. thread5_entry,
  228. RT_NULL,
  229. THREAD_STACK_SIZE,
  230. __current_thread->current_priority - 1,
  231. THREAD_TIMESLICE);
  232. if (tid5 == RT_NULL)
  233. {
  234. LOG_E("rt_thread_create failed!");
  235. uassert_false(tid5 == RT_NULL);
  236. goto __exit;
  237. }
  238. ret_startup = rt_thread_startup(tid5);
  239. if (ret_startup != RT_EOK)
  240. {
  241. LOG_E("rt_thread_startup failed!");
  242. uassert_false(1);
  243. goto __exit;
  244. }
  245. tid6 = rt_thread_create("thread6",
  246. thread6_entry,
  247. RT_NULL,
  248. THREAD_STACK_SIZE,
  249. __current_thread->current_priority - 1,
  250. THREAD_TIMESLICE);
  251. if (tid6 == RT_NULL)
  252. {
  253. LOG_E("rt_thread_create failed!");
  254. uassert_false(tid6 == RT_NULL);
  255. goto __exit;
  256. }
  257. ret_startup = rt_thread_startup(tid6);
  258. if (ret_startup != RT_EOK)
  259. {
  260. LOG_E("rt_thread_startup failed!");
  261. uassert_false(1);
  262. goto __exit;
  263. }
  264. while (tid6_finish_flag != 1);
  265. uassert_true(thread5_source == 10);
  266. __exit:
  267. if (tid5 != RT_NULL)
  268. {
  269. rt_thread_delete(tid5);
  270. }
  271. return;
  272. }
  273. static void thread7_entry(void *parameter)
  274. {
  275. while (1);
  276. }
  277. static void test_thread_control(void)
  278. {
  279. rt_err_t ret_control = -RT_ERROR;
  280. rt_err_t rst_delete = -RT_ERROR;
  281. tid7 = rt_thread_create("thread7",
  282. thread7_entry,
  283. RT_NULL,
  284. THREAD_STACK_SIZE,
  285. __current_thread->current_priority + 1,
  286. THREAD_TIMESLICE);
  287. if (tid7 == RT_NULL)
  288. {
  289. LOG_E("rt_thread_create failed!");
  290. uassert_false(tid7 == RT_NULL);
  291. goto __exit;
  292. }
  293. ret_control = rt_thread_control(tid7, RT_THREAD_CTRL_STARTUP, RT_NULL);
  294. if (ret_control != RT_EOK)
  295. {
  296. LOG_E("rt_thread_control failed!");
  297. uassert_false(1);
  298. goto __exit;
  299. }
  300. rt_thread_mdelay(200);
  301. rt_thread_control(tid7, RT_THREAD_CTRL_CHANGE_PRIORITY, &change_priority);
  302. if (tid7->current_priority != change_priority)
  303. {
  304. LOG_E("rt_thread_control failed!");
  305. uassert_false(1);
  306. goto __exit;
  307. }
  308. rst_delete = rt_thread_control(tid7, RT_THREAD_CTRL_CLOSE, RT_NULL);
  309. if (rst_delete != RT_EOK)
  310. {
  311. LOG_E("rt_thread_control failed!");
  312. uassert_false(rst_delete != RT_EOK);
  313. goto __exit;
  314. }
  315. uassert_true(1);
  316. __exit:
  317. if (tid7 != RT_NULL && rst_delete != RT_EOK)
  318. {
  319. rt_thread_delete(tid7);
  320. }
  321. return;
  322. }
  323. static void thread8_entry(void *parameter)
  324. {
  325. for (; count < 10; count ++);
  326. }
  327. static void test_thread_priority(void)
  328. {
  329. rt_err_t ret_startup = -RT_ERROR;
  330. rt_thread_t tid8 = RT_NULL;
  331. tid8 = rt_thread_create("thread8",
  332. thread8_entry,
  333. RT_NULL,
  334. THREAD_STACK_SIZE,
  335. __current_thread->current_priority - 1,
  336. THREAD_TIMESLICE);
  337. if (tid8 == RT_NULL)
  338. {
  339. LOG_E("rt_thread_create failed!");
  340. uassert_false(tid8 == RT_NULL);
  341. return;
  342. }
  343. count = 0;
  344. ret_startup = rt_thread_startup(tid8);
  345. if (ret_startup != RT_EOK)
  346. {
  347. uassert_false(ret_startup != RT_EOK);
  348. return ;
  349. }
  350. uassert_true(count == 10);
  351. return;
  352. }
  353. static void test_delay_until(void)
  354. {
  355. rt_tick_t tick;
  356. rt_tick_t check_tick = 0;
  357. rt_tick_t delta = 0;
  358. tick = rt_tick_get();
  359. check_tick = tick;
  360. rt_thread_delay_until(&tick, 100);
  361. delta = rt_tick_get() - check_tick;
  362. rt_kprintf("delta[100] -> %d\n", delta);
  363. uassert_int_equal(delta, 100);
  364. check_tick = tick;
  365. rt_thread_delay(2);
  366. rt_thread_delay_until(&tick, 200);
  367. delta = rt_tick_get() - check_tick;
  368. rt_kprintf("delta[200] -> %d\n", delta);
  369. uassert_int_equal(delta, 200);
  370. check_tick = tick;
  371. rt_thread_delay(2);
  372. rt_thread_delay_until(&tick, 300);
  373. delta = rt_tick_get() - check_tick;
  374. rt_kprintf("delta[300] -> %d\n", delta);
  375. uassert_int_equal(delta, 300);
  376. check_tick = tick;
  377. rt_thread_delay(2);
  378. rt_thread_delay_until(&tick, 100);
  379. delta = rt_tick_get() - check_tick;
  380. uassert_int_equal(delta, 100);
  381. check_tick = tick;
  382. rt_thread_delay(2);
  383. rt_thread_delay_until(&tick, 50);
  384. delta = rt_tick_get() - check_tick;
  385. rt_kprintf("delta[50] -> %d\n", delta);
  386. uassert_int_equal(delta, 50);
  387. check_tick = tick;
  388. rt_thread_delay(2);
  389. rt_thread_delay_until(&tick, 20);
  390. delta = rt_tick_get() - check_tick;
  391. rt_kprintf("delta[20] -> %d\n", delta);
  392. uassert_int_equal(delta, 20);
  393. check_tick = tick;
  394. rt_thread_delay(2);
  395. rt_thread_delay_until(&tick, 10);
  396. delta = rt_tick_get() - check_tick;
  397. rt_kprintf("delta[10] -> %d\n", delta);
  398. uassert_int_equal(delta, 10);
  399. }
  400. static rt_thread_t tidA, tidB1, tidB2;
  401. static uint32_t timeslice_cntA, timeslice_cntB1, timeslice_cntB2;
  402. static void test_timeslice_threadA_entry(void *parameter)
  403. {
  404. while (1)
  405. {
  406. rt_thread_delay(2);
  407. timeslice_cntA++;
  408. if (timeslice_cntA > 10) return;
  409. }
  410. }
  411. static void test_timeslice_threadB1_entry(void *parameter)
  412. {
  413. while (1)
  414. {
  415. timeslice_cntB1++;
  416. if (timeslice_cntA > 10) return;
  417. }
  418. }
  419. static void test_timeslice_threadB2_entry(void *parameter)
  420. {
  421. while (1)
  422. {
  423. timeslice_cntB2++;
  424. if (timeslice_cntA > 10) return;
  425. }
  426. }
  427. void test_timeslice(void)
  428. {
  429. rt_err_t ret_startup = -RT_ERROR;
  430. uint32_t diff;
  431. timeslice_cntA = 0;
  432. timeslice_cntB1 = 0;
  433. timeslice_cntB2 = 0;
  434. tidA = rt_thread_create("timeslice", test_timeslice_threadA_entry, RT_NULL,
  435. 2048, __current_thread->current_priority + 1, 10);
  436. if (!tidA)
  437. {
  438. LOG_E("rt_thread_create failed!");
  439. return;
  440. }
  441. rt_thread_control(tidA, RT_THREAD_CTRL_BIND_CPU, (void *)1);
  442. ret_startup = rt_thread_startup(tidA);
  443. if (ret_startup != RT_EOK)
  444. {
  445. LOG_E("rt_thread_startup failed!");
  446. uassert_false(1);
  447. return ;
  448. }
  449. tidB1 = rt_thread_create("timeslice", test_timeslice_threadB1_entry, RT_NULL,
  450. 2048, __current_thread->current_priority + 2, 2);
  451. if (!tidB1)
  452. {
  453. LOG_E("rt_thread_create failed!");
  454. return;
  455. }
  456. rt_thread_control(tidB1, RT_THREAD_CTRL_BIND_CPU, (void *)1);
  457. ret_startup = rt_thread_startup(tidB1);
  458. if (ret_startup != RT_EOK)
  459. {
  460. LOG_E("rt_thread_startup failed!");
  461. uassert_false(1);
  462. return ;
  463. }
  464. tidB2 = rt_thread_create("timeslice", test_timeslice_threadB2_entry, RT_NULL,
  465. 2048, __current_thread->current_priority + 2, 2);
  466. if (!tidB2)
  467. {
  468. LOG_E("rt_thread_create failed!");
  469. return;
  470. }
  471. rt_thread_control(tidB2, RT_THREAD_CTRL_BIND_CPU, (void *)1);
  472. ret_startup = rt_thread_startup(tidB2);
  473. if (ret_startup != RT_EOK)
  474. {
  475. LOG_E("rt_thread_startup failed!");
  476. uassert_false(1);
  477. return ;
  478. }
  479. do{
  480. rt_thread_delay(2 * 20);
  481. }while(timeslice_cntA <= 10);
  482. rt_kprintf("A:%d,B1:%d,B2:%d\n", timeslice_cntA, timeslice_cntB1, timeslice_cntB2);
  483. diff = abs(timeslice_cntB1 - timeslice_cntB2);
  484. uassert_true(diff * 100 / timeslice_cntB1 < 30);
  485. uassert_true(timeslice_cntA == 11);
  486. }
  487. #ifndef RT_USING_SMP
  488. static volatile rt_uint32_t yield_count;
  489. static void test_thread_yield_inc_entry(void *parameter)
  490. {
  491. rt_uint32_t loop = 0;
  492. while (1)
  493. {
  494. if (loop++ > 10001)
  495. break;
  496. yield_count++;
  497. rt_thread_yield();
  498. }
  499. }
  500. static void test_thread_yield_entry(void *parameter)
  501. {
  502. rt_err_t ret_startup = -RT_ERROR;
  503. rt_thread_t tid;
  504. rt_uint32_t loop = 0;
  505. rt_uint32_t count_before;
  506. tid = rt_thread_create("inc", test_thread_yield_inc_entry, RT_NULL,
  507. 2048, 1, 10);
  508. if (!tid)
  509. {
  510. LOG_E("rt_thread_create failed!");
  511. return;
  512. }
  513. ret_startup = rt_thread_startup(tid);
  514. if (ret_startup != RT_EOK)
  515. {
  516. LOG_E("rt_thread_startup failed!");
  517. uassert_false(1);
  518. return ;
  519. }
  520. while (1)
  521. {
  522. if (loop++ > 10000)
  523. break;
  524. count_before = yield_count;
  525. rt_thread_yield();
  526. if (yield_count == count_before)
  527. {
  528. LOG_E("yield error!");
  529. return;
  530. }
  531. }
  532. thread_yield_flag = 1;
  533. }
  534. void test_thread_yield_nosmp(void)
  535. {
  536. rt_err_t ret_startup = -RT_ERROR;
  537. rt_thread_t tid;
  538. yield_count = 0;
  539. tid = rt_thread_create("chkcnt", test_thread_yield_entry, RT_NULL,
  540. 2048, 1, 10);
  541. if (!tid)
  542. {
  543. LOG_E("rt_thread_create failed!");
  544. return;
  545. }
  546. ret_startup = rt_thread_startup(tid);
  547. if (ret_startup != RT_EOK)
  548. {
  549. LOG_E("rt_thread_startup failed!");
  550. uassert_false(1);
  551. return ;
  552. }
  553. uassert_true(thread_yield_flag == 1);
  554. }
  555. static rt_uint32_t thread9_count = 0;
  556. static void thread9_entry(void *parameter)
  557. {
  558. while (1)
  559. {
  560. thread9_count ++;
  561. }
  562. }
  563. static void test_thread_suspend(void)
  564. {
  565. static rt_thread_t tid;
  566. rt_err_t ret_startup = -RT_ERROR;
  567. uint32_t count_before_suspend, count_before_resume, count_after_resume;
  568. tid = rt_thread_create("thread9",
  569. thread9_entry,
  570. RT_NULL,
  571. THREAD_STACK_SIZE,
  572. __current_thread->current_priority + 1,
  573. THREAD_TIMESLICE);
  574. if (tid == RT_NULL)
  575. {
  576. LOG_E("rt_thread_create failed!");
  577. uassert_false(tid4 == RT_NULL);
  578. goto __exit;
  579. }
  580. ret_startup = rt_thread_startup(tid);
  581. if (ret_startup != RT_EOK)
  582. {
  583. LOG_E("rt_thread_startup failed!");
  584. uassert_false(1);
  585. goto __exit;
  586. }
  587. rt_thread_delay(5);
  588. rt_thread_suspend(tid);
  589. count_before_suspend = thread9_count;
  590. uassert_true(count_before_suspend != 0);
  591. rt_thread_delay(5);
  592. count_before_resume = thread9_count;
  593. uassert_true(count_before_suspend == count_before_resume);
  594. rt_thread_resume(tid);
  595. rt_thread_delay(5);
  596. count_after_resume = thread9_count;
  597. uassert_true(count_after_resume != count_before_resume);
  598. __exit:
  599. if (tid != RT_NULL)
  600. {
  601. rt_thread_delete(tid);
  602. }
  603. return;
  604. }
  605. #endif
  606. static rt_err_t utest_tc_init(void)
  607. {
  608. __current_thread = rt_thread_self();
  609. change_priority = __current_thread->current_priority + 5;
  610. tid3_delay_pass_flag = 0;
  611. tid3_finish_flag = 0;
  612. tid4_finish_flag = 0;
  613. tid6_finish_flag = 0;
  614. entry_idle_hook_times = 0;
  615. count = 0;
  616. return RT_EOK;
  617. }
  618. static rt_err_t utest_tc_cleanup(void)
  619. {
  620. return RT_EOK;
  621. }
  622. static void testcase(void)
  623. {
  624. /* init, detach */
  625. UTEST_UNIT_RUN(test_static_thread);
  626. /* create, delete */
  627. UTEST_UNIT_RUN(test_dynamic_thread);
  628. /* delay */
  629. UTEST_UNIT_RUN(test_thread_delay);
  630. /* idle_sethook, idle_delhook */
  631. UTEST_UNIT_RUN(test_idle_hook);
  632. /* yield */
  633. UTEST_UNIT_RUN(test_thread_yield);
  634. #ifndef RT_USING_SMP
  635. /* yield_nosmp */
  636. UTEST_UNIT_RUN(test_thread_yield_nosmp);
  637. /* suspend, resume */
  638. UTEST_UNIT_RUN(test_thread_suspend);
  639. #endif
  640. /* control */
  641. UTEST_UNIT_RUN(test_thread_control);
  642. UTEST_UNIT_RUN(test_thread_priority);
  643. /* delay_until */
  644. UTEST_UNIT_RUN(test_delay_until);
  645. /* timeslice */
  646. UTEST_UNIT_RUN(test_timeslice);
  647. }
  648. UTEST_TC_EXPORT(testcase, "testcases.kernel.thread_tc", utest_tc_init, utest_tc_cleanup, 1000);
  649. /********************* end of file ************************/