Skip to content

Conversation

@unicornx
Copy link
Contributor

@unicornx unicornx commented Sep 15, 2025

本 PR 用于解决

本 PR 由两个 commit 组成(merge 时请保留两个 commit ,不要 压缩。):

  • “doxygen: update naming rule for utest-case”:更新 document 中有关 utest name 命名规范的说明。
  • “utest: update naems using new rule”:根据新的命名规范更新 utest case 的名字。注意本 PR 中并没有更新所有的 case 的名字,而只是更新了已经按照分布式原则(参考 [Feature] RFC:整理内核单元测试 #10513)在各自所属模块下定义的 utest case 的名字。

还有一些未放在各自所属模块下的 utest case 的名字,因为需要最终确定这些 case 所在的路径后才好确定它们的唯一的名字,所以暂时还没有修改。它们包括:

  • 还在 examples 下的 utest cases
  • bsp/qemu-virt64-riscv/applications/test/test_vector/test_vector.c, 这个测试用例感觉应该放到 libcpu/rsic-v 下去而不是放在 bsp 下。

这些 case 会最终按照分布式的原则移动所在目录,新的名字会跟随这些工作逐步平滑完成。目前这些case 的名字和已经统一的名字看上去暂时不会冲突。

以上两个问题已经记录在 #10661 备忘。

More details see PR RT-Thread#10681.

As utest cases are currently moving out of `examples/utest/testcases`
into their own module directories, the naming rule needs to change
accordingly.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
@github-actions
Copy link

github-actions bot commented Sep 15, 2025

📌 Code Review Assignment

🏷️ Tag: bsp_k230

Reviewers: unicornx

Changed Files (Click to expand)
  • bsp/k230/drivers/utest/test_adc.c
  • bsp/k230/drivers/utest/test_gpio.c
  • bsp/k230/drivers/utest/test_gpio_irq.c
  • bsp/k230/drivers/utest/test_pdma.c
  • bsp/k230/drivers/utest/test_pwm.c
  • bsp/k230/drivers/utest/test_timer.c
  • bsp/k230/drivers/utest/test_ts.c
  • bsp/k230/drivers/utest/test_uart.c
  • bsp/k230/drivers/utest/test_wdt.c

🏷️ Tag: components

Reviewers: Maihuanyi

Changed Files (Click to expand)
  • components/drivers/audio/utest/tc_audio_main.c
  • components/utilities/utest/utest/TC_uassert.c

🏷️ Tag: documentation

Reviewers: CXSforHPU GorrayLi lianux-mm unicornx

Changed Files (Click to expand)
  • documentation/6.components/utest/utest.md

🏷️ Tag: kernel

Reviewers: GorrayLi ReviewSun hamburger-os lianux-mm wdfk-prog xu18838022837

Changed Files (Click to expand)
  • src/klibc/utest/TC_rt_memcmp.c
  • src/klibc/utest/TC_rt_memcpy.c
  • src/klibc/utest/TC_rt_memmove.c
  • src/klibc/utest/TC_rt_memset.c
  • src/klibc/utest/TC_rt_sprintf.c
  • src/klibc/utest/TC_rt_sscanf.c

📊 Current Review Status (Last Updated: 2025-09-15 17:14 CST)

  • CXSforHPU Pending Review
  • GorrayLi Pending Review
  • Maihuanyi Pending Review
  • ReviewSun Pending Review
  • hamburger-os Pending Review
  • lianux-mm Pending Review
  • unicornx Pending Review
  • wdfk-prog Pending Review
  • xu18838022837 Pending Review

📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

@unicornx unicornx requested a review from Rbb666 September 15, 2025 07:22
}

UTEST_TC_EXPORT(utest_do_tc, "utest", RT_NULL, RT_NULL, 10);
UTEST_TC_EXPORT(utest_do_tc, "components.utilities.utest.utest", RT_NULL, RT_NULL, 10);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块是不是多写了一个 utest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块是不是多写了一个 utest

不是的,这里 module prefix 就是 “components.utilities.utest”

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是属于utest框架的建议可以修改全名为components.utilities.utest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是属于utest框架的建议可以修改全名为components.utilities.utest

哦,是这样的,"components.utilities.utest.utest" 是全名,其中 “components.utilities.utest” 是 module prefix,最后一个 utest 是 “test function"。因为原来就是这么起的名字,我就没有改。

不过这个可能看上去怪怪的,导致了你们的误解,我把 function 部分改成 uassert 吧,因为这里的测试主要就是在验证那些 uassert 的 API。

@unicornx unicornx requested review from Rbb666 and kurisaW and removed request for Cathy-lulu and mysterywolf September 15, 2025 07:29
The names of the utest cases defined in their respective
modules have been updated.

Some utest case names are not yet in their respective modules
because their paths need to be finalized before their unique
names can be determined. Currently, these names do not
appear to conflict with the unified names. These include:

- utest cases still in examples
- bsp/qemu-virt64-riscv/applications/test/test_vector/test_vector.c.
  The entire test case should probably be placed in libcpu/risc-v
  rather than bsp.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
@unicornx unicornx force-pushed the dev-unify-utest-name branch from a6d91d6 to 5e177f1 Compare September 15, 2025 09:14
@unicornx
Copy link
Contributor Author

@Rbb666 @kurisaW 已修改,请继续 review。

@hamburger-os
Copy link
Contributor

LGTM

@Rbb666 Rbb666 merged commit b03bb70 into RT-Thread:master Sep 15, 2025
67 checks passed
@unicornx unicornx deleted the dev-unify-utest-name branch September 17, 2025 01:30
@Rbb666 Rbb666 mentioned this pull request Sep 18, 2025
11 tasks
@Rbb666 Rbb666 added this to the v5.2.2 milestone Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BSP component: drivers/audio component: drivers Component Doc This PR/issue related with documents Kernel PR has src relate code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants