Skip to content

[Feature] Utest 测试用例推进事项 #10680

Closed
Closed

Description

@Rbb666

Describe problem solved by the proposed feature

由于目前RTT关于组件相关的 UTEST 测试用例较为欠缺,为了更好的针对组件进行维护,需要针对重点组件进行测试用例的补充,目前准备推进的测试用例包括以下内容:

初步期望达成的目标:

  • 覆盖到90%以上的API
  • 部署到CI(qemu)上运行测试

文件系统

网络

C++

utilities

  • ulog

其他优化项

Activity

  1. unicornx commented on Sep 10, 2025

    @unicornx
    Contributor

    #10681 和这个工作有关,欢迎评论。

    另外这个 issue 是否可以归属到 #10661 的子 issue?

  2. illustriousness commented on Sep 10, 2025

    @illustriousness
    Contributor

    支持

  3. Ryan-CW-Code commented on Sep 10, 2025

    @Ryan-CW-Code
    Contributor

    支持,但感觉不要着急,先完善一下测试框架。
    比如引入模糊测试,替代目前手动实现或者没有实现的随机数据生成方式。
    申请Coverity Scan对RTT进行检查,开源项目免费,还是能发现一些cppcheck查不到的错误。
    在qemu测试时把Sanitizer打开,在muc跑时使用RTT的内存检查,没有的话可以提供一下
    还有引入coderabbitai审查,它会比copilot更详细一些,很多前端项目都在使用,对C的支持也很好

    可以参考zephyr的实践,与utest结合一下,希望RTT越来越好😊

  4. Rbb666 commented on Sep 10, 2025

    @Rbb666
    MemberAuthor

    #10681 和这个工作有关,欢迎评论。

    另外这个 issue 是否可以归属到 #10661 的子 issue?

    已添加

  5. Rbb666 commented on Sep 10, 2025

    @Rbb666
    MemberAuthor

    支持,但感觉不要着急,先完善一下测试框架。 比如引入模糊测试,替代目前手动实现或者没有实现的随机数据生成方式。 申请Coverity Scan对RTT进行检查,开源项目免费,还是能发现一些cppcheck查不到的错误。 在qemu测试时把Sanitizer打开,在muc跑时使用RTT的内存检查,没有的话可以提供一下 还有引入coderabbitai审查,它会比copilot更详细一些,很多前端项目都在使用,对C的支持也很好

    可以参考zephyr的实践,与utest结合一下,希望RTT越来越好😊

    Coverity Scan 这个我不太熟悉,大佬可以尝试着给CI添加一下?

  6. Ryan-CW-Code commented on Sep 10, 2025

    @Ryan-CW-Code
    Contributor

    Coverity Scan 据我了解没有很方便和CI进行集成的方法,只能维护者手动进行操作。
    zephyr官方默认SCA是Coverity Scan,两周手动执行一次,然后用脚本添加到issue。

    linux和freertos的静态分析也在使用 Coverity Scan , 我体验过是比cppcheck和clang-tidy强的,就是稍微有点麻烦,需要先申请,还要下载软件,生成文件再上传,然后等待分析结果,还需要手动或者脚本添加到issue中

  7. linked a pull request that will close this issue[utest][lwip]add lwip api testcase. #10675on Oct 20, 2025
  8. linked a pull request that will close this issue[utest][netdev]add netdev api testcases. #10697on Oct 20, 2025
  9. linked a pull request that will close this issuefeat:[sal] improve the error return of sal #10719on Oct 20, 2025
  10. linked a pull request that will close this issue[utest][cpp]Advance C++ test cases. #10711on Oct 20, 2025
  11. moved this from Done to In progress in 单元测试(UTEST)Frameworkon Nov 8, 2025
  12. added this to the v5.2.2 milestone on Nov 8, 2025
  13. added theissue type on Nov 8, 2025
  14. reopened this on Nov 8, 2025
  15. moved this from In progress to Done in 单元测试(UTEST)Frameworkon Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions