RT-Thread / RT-Thread/rt-thread
几处未知原因的rtthread utest问题
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
我使用GD32F103RCT6开发板移植STM32的相关BSP,在UTEST中遇到几个问题,其中部分已提交PR,另外几处确实不熟悉原因:
- mailbox_tc.c中,thread3_recv_dynamic_mb,result = rt_mb_recv(test_dynamic_mb, (rt_ubase_t *)&mb_recv_str2, RT_WAITING_FOREVER);,会在第二次运行utest时失败,打断点发现在ipc.c:2318行,rt_schedule();行失败,然后线程返回错误。
- thread_tc.c中,test_thread_suspend函数,会在此test case中,使用rt_thread_suspend中断其它线程,但看上去rt_thread_suspend是不允许其它线程中断的,因RT_ASSERT(thread == rt_thread_self());约束
还请大佬们指教
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with mailbox_tc.c at thread3_recv_dynamic_mb and reproduce the failure on the second UTEST run, then inspect ipc.c:2318 around rt_schedule(). Also read thread_tc.c at test_thread_suspend and the RT_ASSERT(thread == rt_thread_self()) constraint; done means the causes and expected behavior of both failures are established and the affected tests behave consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100