Skip to content

test[CI][littlefs]: add RT-Thread QEMU smoke coverage#36

Merged
Rbb666 merged 5 commits into
RT-Thread-packages:masterfrom
wdfk-prog:DFS_V2
May 7, 2026
Merged

test[CI][littlefs]: add RT-Thread QEMU smoke coverage#36
Rbb666 merged 5 commits into
RT-Thread-packages:masterfrom
wdfk-prog:DFS_V2

Conversation

@wdfk-prog
Copy link
Copy Markdown
Collaborator

@wdfk-prog wdfk-prog commented May 7, 2026

拉取/合并请求描述:(PR description)

[

为什么提交这份PR (why to submit this PR)

当前 RT-Thread littlefs 包 CI 主要覆盖多版本编译检查,缺少在 QEMU BSP 上执行 littlefs 文件系统基本读写、目录遍历和卸载重挂载流程的自动化 smoke test。

该 PR 增加 qemu-vexpress-a9 场景下的 littlefs smoke test,并将 RT-Thread tag 与 master 的测试拆分为独立矩阵任务,提升 CI 覆盖度和失败定位效率。

你的解决方案是什么 (what is your solution)

  • .github/ci/rtthread-littlefs/build.sh 中增加可选的 RTTHREAD_RUN_SMOKE 流程。
  • 为 QEMU smoke test 生成 RAM-backed MTD NOR 设备和自动 littlefs 测试应用。
  • 覆盖 mkfs、mount、文件写入/读取校验、目录创建/遍历、unmount/remount 后数据保持性检查。
  • 增加 RT-Thread source archive/cache 支持,减少重复 clone,并为 master 分支使用同一轮 artifact 避免不同矩阵任务取到不同 master HEAD。
  • .github/workflows/rtthread.yml 拆分为 tag profile 和 master profile 两类 job,并加入 ARM GCC、Python 依赖、RT-Thread source 和 QEMU 相关准备步骤。
  • 新增 .github/ci/rtthread-littlefs/requirements.txt 固定 kconfiglibscons 版本。

请提供验证的bsp和config (provide the config and bsp)

  • BSP: bsp/qemu-vexpress-a9

  • .config:

    • RTTHREAD_DFS_VERSION=v1
    • RTTHREAD_DFS_VERSION=v2
    • RTTHREAD_RUN_SMOKE=1
    • RT_USING_DFS
    • DFS_USING_POSIX
    • DFS_USING_WORKDIR
    • RT_USING_DFS_DEVFS
    • RT_USING_DFS_ROMFS
    • RT_USING_DFS_TMPFS
    • RT_USING_MTD_NOR
    • PKG_USING_LITTLEFS
    • RT_USING_DFS_V1RT_USING_DFS_V2
  • action: 本地输入中未提供可引用的 GitHub Actions 成功链接;提交 PR 前请替换为当前 PR 分支对应的成功 workflow 链接。

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

Summary by CodeRabbit

  • New Features
    • CI workflow and composite action to build and test RT-Thread + LittleFS across tags and master.
  • Tests
    • Added compile-check and full LittleFS smoke tests, QEMU-backed MTD emulator, and CI test harness/scripts/requirements.
  • Refactor
    • Reworked DFS/LittleFS integration to support multiple DFS ABI versions with v2-aware vnode/file handling.

wdfk-prog added 3 commits May 5, 2026 20:28
add DFS v2 mount, dentry, vnode and filesystem type registration paths for littlefs
centralize DFS ABI differences across DFS v2, RT-Thread 5.x DFS v1 and legacy DFS layouts
adapt read/write/lseek signatures and explicit offset handling for DFS v2
keep legacy DFS v1 behavior through compatibility macros
verify basic build and QEMU littlefs DFS v2 smoke flow on bsp/qemu-vexpress-a9
avoid copying DFS_PATH_MAX bytes into struct dirent d_name
use the actual d_name buffer size when filling littlefs directory entries
keep d_namlen consistent with the copied name length after truncation
fix stack corruption observed when listing littlefs directories on DFS v2
add RT-Thread qemu-vexpress-a9 compile checks for littlefs DFS profiles
cover legacy DFS, RT-Thread 5.x DFS v1, DFS v2, and master builds
reuse a prepared RT-Thread checkout across profile builds to reduce repeated downloads
upload per-profile build logs for CI failure diagnosis
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Walkthrough

This PR refactors dfs_lfs.c to support DFS v1/v2 ABIs and adds end-to-end CI: a composite action to set up toolchain/env, a build script that clones/prepares RT-Thread and runs SCons, a GitHub Actions workflow, pinned CI Python deps, QEMU MTD emulation, and smoke-test applications.

Changes

DFS/LittleFS Multi-ABI Support & CI Integration

Layer / File(s) Summary
DFS Core Refactoring
dfs_lfs.c
Introduces DFS_LFS_* macros to abstract v1/v2 ABI differences (filesystem/mount types, file metadata access, read/write/seek signatures, and vnode/dentry wiring). Adds sync helpers for file position tracking under DFS v2 and converts all filesystem/file/directory operations to use unified macro accessors. Includes new DFS-v2-only dentry/vnode layer with lookup, creation, and free operations.
Smoke Test Implementations
.github/ci/rtthread-littlefs/smoke/*
Defines compile-time linkage validation (littlefs_compile_check), functional smoke test that writes/reads files and traverses directories with QEMU and remount verification (littlefs_smoke_run), and RAM-backed MTD NOR device emulation with read/write/erase callbacks (qemu_lfs_mtd_init).
Build & Test Orchestration
.github/ci/rtthread-littlefs/build.sh,
.github/ci/rtthread-littlefs/requirements.txt
Main build pipeline that validates inputs, manages RT-Thread checkout lifecycle (clone/cache/reuse), applies littlefs DFS kconfig profiles, verifies config/ELF symbols, compiles firmware, and orchestrates QEMU smoke test with timeout enforcement and log-based pass/fail detection. Python dependencies pinned to kconfiglib==14.1.0 and scons==4.0.1.
Build Environment Setup
.github/actions/setup-rtthread-build/action.yml
Composite GitHub action that exports RT-Thread/ARM GCC environment variables, installs Python and system dependencies, sets up cached ARM GCC toolchain with MD5 verification, and configures PATH and RTT_EXEC_PATH.
CI Workflow Definition
.github/workflows/rtthread.yml
Three-job workflow: prepare-master-source clones RT-Thread master with SHA/tarball artifacts; test-littlefs-tag runs matrix over tagged releases (v4.1.1–v5.0.2) with per-ref source caching; test-littlefs-master tests master source with cache reads disabled. All jobs enforce strict bash, minimal permissions, and per-ref concurrency.

Sequence Diagram

sequenceDiagram
    actor User
    participant GH as GitHub Actions
    participant Cache as Cache/Artifacts
    participant Action as setup-rtthread-build
    participant Build as build.sh
    participant RTT as RT-Thread
    participant QEMU as QEMU Emulator

    User->>GH: push / open PR / dispatch

    GH->>Action: run composite action (setup toolchain/env)
    Action->>Cache: restore ARM GCC cache
    alt cache miss
      Action->>Cache: download+verify toolchain -> install
    end

    GH->>Build: invoke build.sh
    Build->>RTT: prepare sources / copy package / apply Kconfig
    Build->>RTT: run SCons -> produce ELF
    Build->>Build: verify ELF symbols
    alt rtthread-run-smoke enabled
      Build->>QEMU: launch emulator
      QEMU->>QEMU: run littlefs_smoke_run (write/read/list/remount)
      QEMU-->>Build: emit PASS/FAIL marker in log
      Build->>QEMU: stop emulator
    end

    Build->>Cache: upload logs/artifacts
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • Rbb666
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main contribution: adding RT-Thread QEMU smoke test coverage for littlefs CI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
.github/ci/rtthread-littlefs/smoke/qemu_lfs_mtd.c (1)

73-86: ⚡ Quick win

Align macro guards with dfs_lfs.c pattern for consistency.

Lines 73 and 82 use RT_VERSION_CHECK without a defined(RT_VERSION_CHECK) guard, while dfs_lfs.c in the same codebase consistently wraps similar checks. Consider adding the guard for defensive programming consistency, even though RT_VERSION_CHECK is defined in all tested RT-Thread versions (v4.1.1 and later).

Suggested fix
-#if RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0)
+#if defined(RT_VERSION_CHECK) && (RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0))
 typedef rt_ssize_t qemu_lfs_mtd_rw_ret_t;
 `#else`
 typedef rt_size_t qemu_lfs_mtd_rw_ret_t;
-#endif /* RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0) */
+#endif /* defined(RT_VERSION_CHECK) && (RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0)) */
 
 /**
  * `@brief` Length type used by RT-Thread MTD NOR callbacks.
  */
-#if RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0)
+#if defined(RT_VERSION_CHECK) && (RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0))
 typedef rt_size_t qemu_lfs_mtd_len_t;
 `#else`
 typedef rt_uint32_t qemu_lfs_mtd_len_t;
-#endif /* RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0) */
+#endif /* defined(RT_VERSION_CHECK) && (RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0)) */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/ci/rtthread-littlefs/smoke/qemu_lfs_mtd.c around lines 73 - 86, The
RT_VERSION_CHECK macro uses should be guarded like in dfs_lfs.c to avoid
undefined-macro issues: update the two typedef conditionals around
qemu_lfs_mtd_rw_ret_t and qemu_lfs_mtd_len_t to use a combined preprocessor
check (e.g., `#if` defined(RT_VERSION_CHECK) && RTTHREAD_VERSION >=
RT_VERSION_CHECK(5, 0, 0)) and keep the existing else branches unchanged so
behavior is identical when RT_VERSION_CHECK is unavailable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/actions/setup-rtthread-build/action.yml:
- Around line 21-24: Change the input name and verification algorithm from MD5
to SHA-256: rename the input key arm-gcc-md5 to arm-gcc-sha256, update its
description to say "Expected SHA-256 checksum for the ARM GCC toolchain
archive", and replace the default MD5 hex with the correct SHA-256 hex. Then
update all places that reference arm-gcc-md5 (workflow steps, scripts, and
checksum checks) to use arm-gcc-sha256 and change the verification command to
use sha256sum (or an equivalent SHA-256 check) instead of md5sum so the CI
actually verifies using SHA-256.

In @.github/ci/rtthread-littlefs/build.sh:
- Around line 667-683: Wrap the blocking git clone in a timeout so stalled
clones don't hang the retry loop: replace the plain git clone call inside the
while loop with a timed invocation such as timeout --preserve-status
"$CLONE_TIMEOUT" git clone --depth 1 --branch "$rtthread_ref"
https://github.com/RT-Thread/rt-thread.git "$rtthread_dir" and ensure a sensible
default CLONE_TIMEOUT is defined (e.g. export
CLONE_TIMEOUT="${CLONE_TIMEOUT:-300}") so the loop reacts to timeout failures
and proceeds to the rm -rf / retry logic and ultimately calls fail if all
attempts exhaust.

In `@dfs_lfs.c`:
- Around line 1249-1255: The _dfs_lfs_dentry_rename handler currently always
calls _dfs_lfs_rename using old_dentry->mnt and will forward
new_dentry->pathname into the wrong FS when the destination is on a different
mount; modify _dfs_lfs_dentry_rename to compare old_dentry->mnt and
new_dentry->mnt and if they differ return -EXDEV, otherwise call
_dfs_lfs_rename(old_dentry->mnt, old_dentry->pathname, new_dentry->pathname).
Ensure you reference the dfs_dentry struct fields mnt and pathname and return
the POSIX cross-device error -EXDEV for cross-mount renames.
- Around line 1135-1147: The code currently converts offset into an unsigned
directory index before calling lfs_dir_seek, which permits negative or unaligned
offsets to wrap or desynchronize; before computing off and calling lfs_dir_seek
(in the DFS_LFS_FILE_TYPE(file) == FT_DIRECTORY branch), validate offset is
non-negative and aligned to sizeof(struct dirent) and return -EINVAL if not;
then compute off = offset / sizeof(struct dirent) and call lfs_dir_seek as
before, ensuring any casts to lfs_off_t/lfs_soff_t are done after the
validation.

---

Nitpick comments:
In @.github/ci/rtthread-littlefs/smoke/qemu_lfs_mtd.c:
- Around line 73-86: The RT_VERSION_CHECK macro uses should be guarded like in
dfs_lfs.c to avoid undefined-macro issues: update the two typedef conditionals
around qemu_lfs_mtd_rw_ret_t and qemu_lfs_mtd_len_t to use a combined
preprocessor check (e.g., `#if` defined(RT_VERSION_CHECK) && RTTHREAD_VERSION >=
RT_VERSION_CHECK(5, 0, 0)) and keep the existing else branches unchanged so
behavior is identical when RT_VERSION_CHECK is unavailable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 489be611-da60-4f28-b0a8-7b939a837a43

📥 Commits

Reviewing files that changed from the base of the PR and between 9a3848e and 93cf249.

📒 Files selected for processing (8)
  • .github/actions/setup-rtthread-build/action.yml
  • .github/ci/rtthread-littlefs/build.sh
  • .github/ci/rtthread-littlefs/requirements.txt
  • .github/ci/rtthread-littlefs/smoke/littlefs_compile_check.c
  • .github/ci/rtthread-littlefs/smoke/littlefs_smoke.c
  • .github/ci/rtthread-littlefs/smoke/qemu_lfs_mtd.c
  • .github/workflows/rtthread.yml
  • dfs_lfs.c

Comment on lines +21 to +24
arm-gcc-md5:
description: Expected MD5 checksum for the ARM GCC toolchain archive.
required: false
default: 2383e4eb4ea23f248d33adc70dc3227e
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

cat -n .github/actions/setup-rtthread-build/action.yml

Repository: RT-Thread-packages/littlefs

Length of output: 9548


Use SHA-256 instead of MD5 for the toolchain archive check.

The downloaded compiler is a high-trust artifact in the CI supply chain. MD5 is cryptographically broken and should not be used for integrity verification of build tools, as it cannot guarantee protection against intentional modification.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/setup-rtthread-build/action.yml around lines 21 - 24, Change
the input name and verification algorithm from MD5 to SHA-256: rename the input
key arm-gcc-md5 to arm-gcc-sha256, update its description to say "Expected
SHA-256 checksum for the ARM GCC toolchain archive", and replace the default MD5
hex with the correct SHA-256 hex. Then update all places that reference
arm-gcc-md5 (workflow steps, scripts, and checksum checks) to use arm-gcc-sha256
and change the verification command to use sha256sum (or an equivalent SHA-256
check) instead of md5sum so the CI actually verifies using SHA-256.

Comment thread .github/ci/rtthread-littlefs/build.sh
Comment thread dfs_lfs.c
Comment thread dfs_lfs.c
wdfk-prog added 2 commits May 7, 2026 20:00
- add QEMU littlefs smoke sources for RT-Thread BSP validation
- split RT-Thread tag and master checks into separate GitHub Actions matrix jobs
- add RT-Thread source archive/cache handling to reduce repeated clone cost
- run compile and smoke verification against qemu-vexpress-a9 DFS v1/v2 profiles
reject cross-mount dentry rename with -EXDEV before using the old mount context
validate directory lseek offsets before converting them to littlefs directory positions
return -EINVAL for negative or non-dirent-aligned directory offsets
@wdfk-prog
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/actions/setup-rtthread-build/action.yml (1)

21-24: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

MD5 integrity check still flagged.

The arm-gcc-md5 input and corresponding md5sum -c verification at line 201 still rely on MD5 for a high-trust build artifact. SHA-256 is the appropriate algorithm here; ARM publishes SHA-256 sums alongside the toolchain archives.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/setup-rtthread-build/action.yml around lines 21 - 24, The
workflow still uses MD5: update the action input and verification to SHA-256 by
renaming the input arm-gcc-md5 to arm-gcc-sha256 (and update its description),
replace any md5sum -c usage with sha256sum -c in the verification step (the
place currently invoking md5sum -c), and replace the default checksum value with
the published SHA-256 for the ARM GCC archive so the integrity check uses
SHA-256 end-to-end.
🧹 Nitpick comments (2)
.github/workflows/rtthread.yml (1)

70-77: 💤 Low value

Set a short retention-days on the inter-job source artifact.

rtthread-master-source is only consumed by test-littlefs-master in the same run, but defaults to 90-day retention. Setting retention-days: 1 (or a similar small value) avoids accumulating large tarballs in the repository's artifact storage.

♻️ Proposed change
       - name: Upload RT-Thread master source
         uses: actions/upload-artifact@v4
         with:
           name: rtthread-master-source
           path: |
             _ci/artifacts/rt-thread-master.tar
             _ci/artifacts/rt-thread-master.sha
           if-no-files-found: error
+          retention-days: 1
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/rtthread.yml around lines 70 - 77, The artifact upload
step "Upload RT-Thread master source" currently leaves artifacts with the
default retention and should be updated to avoid long-term storage; add a
retention-days field under the step's with block (for the artifact named
rtthread-master-source) — e.g., add retention-days: 1 so the
actions/upload-artifact@v4 invocation that publishes rtthread-master-source
keeps the tarball only for the short desired period.
.github/ci/rtthread-littlefs/smoke/qemu_lfs_mtd.c (1)

25-29: 💤 Low value

Drop the unused lfsroot MTD instance.

Only lfsnor is consumed by littlefs_smoke.c; the lfsroot device is registered, zero-filled, and never mounted. Each instance carries a 512 KiB static storage[] buffer in BSS, so this wastes ~512 KiB and adds maintenance noise. Reduce QEMU_LFS_MTD_DEVICE_COUNT to 1 and drop the lfsroot entry unless a future test plans to use it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/ci/rtthread-littlefs/smoke/qemu_lfs_mtd.c around lines 25 - 29,
Remove the unused "lfsroot" MTD instance and shrink the static device table to
only the used "lfsnor" entry: update QEMU_LFS_MTD_DEVICE_COUNT from 2 to 1 and
change the qemu_lfs_mtd_devices initializer to contain just { .name = "lfsnor"
}; ensure any code that iterates or indexes qemu_lfs_mtd_devices still respects
the new count (symbols: QEMU_LFS_MTD_DEVICE_COUNT, qemu_lfs_mtd_devices,
"lfsroot", "lfsnor", and any consumers such as littlefs_smoke.c).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/ci/rtthread-littlefs/smoke/littlefs_smoke.c:
- Around line 270-274: The mkdir call creating LFS_SMOKE_DIR uses mode 0 which
yields no permission bits; change the mode passed to mkdir in the littlefs_smoke
setup to a sensible permission like 0755 so the directory is created
readable/executable by owner/group/others and subsequent filesystem layers can
traverse it; update the call that currently returns
littlefs_smoke_fail("mkdir-dir", ret) on error (the mkdir invocation referencing
LFS_SMOKE_DIR) to use 0755 as the mode argument.

---

Duplicate comments:
In @.github/actions/setup-rtthread-build/action.yml:
- Around line 21-24: The workflow still uses MD5: update the action input and
verification to SHA-256 by renaming the input arm-gcc-md5 to arm-gcc-sha256 (and
update its description), replace any md5sum -c usage with sha256sum -c in the
verification step (the place currently invoking md5sum -c), and replace the
default checksum value with the published SHA-256 for the ARM GCC archive so the
integrity check uses SHA-256 end-to-end.

---

Nitpick comments:
In @.github/ci/rtthread-littlefs/smoke/qemu_lfs_mtd.c:
- Around line 25-29: Remove the unused "lfsroot" MTD instance and shrink the
static device table to only the used "lfsnor" entry: update
QEMU_LFS_MTD_DEVICE_COUNT from 2 to 1 and change the qemu_lfs_mtd_devices
initializer to contain just { .name = "lfsnor" }; ensure any code that iterates
or indexes qemu_lfs_mtd_devices still respects the new count (symbols:
QEMU_LFS_MTD_DEVICE_COUNT, qemu_lfs_mtd_devices, "lfsroot", "lfsnor", and any
consumers such as littlefs_smoke.c).

In @.github/workflows/rtthread.yml:
- Around line 70-77: The artifact upload step "Upload RT-Thread master source"
currently leaves artifacts with the default retention and should be updated to
avoid long-term storage; add a retention-days field under the step's with block
(for the artifact named rtthread-master-source) — e.g., add retention-days: 1 so
the actions/upload-artifact@v4 invocation that publishes rtthread-master-source
keeps the tarball only for the short desired period.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3af99aa9-59b4-43d4-986d-e316627f5114

📥 Commits

Reviewing files that changed from the base of the PR and between 93cf249 and 965c55b.

📒 Files selected for processing (8)
  • .github/actions/setup-rtthread-build/action.yml
  • .github/ci/rtthread-littlefs/build.sh
  • .github/ci/rtthread-littlefs/requirements.txt
  • .github/ci/rtthread-littlefs/smoke/littlefs_compile_check.c
  • .github/ci/rtthread-littlefs/smoke/littlefs_smoke.c
  • .github/ci/rtthread-littlefs/smoke/qemu_lfs_mtd.c
  • .github/workflows/rtthread.yml
  • dfs_lfs.c
🚧 Files skipped from review as they are similar to previous changes (1)
  • dfs_lfs.c

Comment thread .github/ci/rtthread-littlefs/smoke/littlefs_smoke.c
@wdfk-prog
Copy link
Copy Markdown
Collaborator Author

@Rbb666

@Rbb666 Rbb666 merged commit beab78f into RT-Thread-packages:master May 7, 2026
10 checks passed
@wdfk-prog wdfk-prog deleted the DFS_V2 branch May 8, 2026 09:43
@wdfk-prog wdfk-prog mentioned this pull request May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants