RT-Thread / RT-Thread/rt-thread

几处未知原因的rtthread utest问题

Open
#6,565 5 comments 0 reactions 0 assignees View on GitHub

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,另外几处确实不熟悉原因:

  1. 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();行失败,然后线程返回错误。
  2. thread_tc.c中,test_thread_suspend函数,会在此test case中,使用rt_thread_suspend中断其它线程,但看上去rt_thread_suspend是不允许其它线程中断的,因RT_ASSERT(thread == rt_thread_self());约束

还请大佬们指教

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.