RT-Thread / RT-Thread/rt-thread
[Feature] 内核单元测试问题汇总
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
这个 issue 作为 #10513 的 child issue,主要用于收集和单元测试有关的问题以及 issue。
-
examples/utest/README.md需要改进,譬如该文件中 “/” 和 ”" 混用。 -
文档描述问题:https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/programming-manual/utest/utest?id=%e6%b5%8b%e8%af%95%e7%94%a8%e4%be%8b-log-%e8%be%93%e5%87%ba%e6%8e%a5%e5%8f%a3 utest 测试框架依赖 ulog 日志模块进行日志输出? 我这里在 qemu-virt64-riscv 上做实验,发现 ulog(
RT_USING_ULOG)并没有开启,也可以工作啊? -
测试用例命名,参考 https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/programming-manual/utest/utest?id=%e6%b5%8b%e8%af%95%e7%94%a8%e4%be%8b%e5%af%bc%e5%87%ba%e5%ae%8f 中针对 “测试用例命名要求”,但目测目前代码中的不符合,貌似不少前面多一个 "testcases.", 是不是要纠正一下?
-
在 testcase 的源文件中加入 doxygen 注释,对每个 case 的输入和输出进行规范化描述,作为测试文档的一部分方便后来人阅读和理解这些 case 设计的目的。
-
#9796
-
utest 比较适合 RT standard 下的测试,编译进 kernel。对于 RT-smart 的测试,有什么想法没有,内核 API 测试应该还是可以用 utest,但用户态的测试感觉要引入其他的机制,譬如 ltp?
-
examples 下的 utest cases 移动到其所属的模块后,需要统一改名,具体参考 #10681
-
bsp/qemu-virt64-riscv/applications/test/test_vector/test_vector.c,这个测试用例感觉应该放到libcpu/rsic-v下去而不是放在 bsp 下。并且,移动到其所属的模块后,需要统一改名,具体参考 #10681 。
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
This is a collection of utest concerns rather than one bounded change. Start with examples/utest/README.md, the utest documentation link, and bsp/qemu-virt64-riscv/applications/test/test_vector/test_vector.c; then review #9796 and #10681. Done requires each listed concern to have a decided change or a separate follow-up issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, embedded-iot
- Domain
- documentation, operating-systems, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100