fix(gvisor): 修复自动化开启/关闭 gvisor 集成的问题#1405
Merged
fslongjin merged 5 commits intoDragonOS-Community:masterfrom Nov 25, 2025
Merged
fix(gvisor): 修复自动化开启/关闭 gvisor 集成的问题#1405fslongjin merged 5 commits intoDragonOS-Community:masterfrom
fslongjin merged 5 commits intoDragonOS-Community:masterfrom
Conversation
ea74a98 to
766c212
Compare
- 在 `write_disk_image.sh` 中添加创建 /tmp 目录的命令。 Signed-off-by: yuming <mingjiangyu1@qq.com>
Signed-off-by: yuming <mingjiangyu1@qq.com>
766c212 to
f4816d4
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the automation scripts for enabling/disabling gvisor integration in the system. It improves the robustness of the configuration block matching logic to support position-independent gvisor code blocks, and ensures the /tmp directory exists in the system image with proper permissions for gvisor usage.
Key Changes:
- Rewrote
enable_compile_gvisor.shanddisable_compile_gvisor.shwith more robust AWK-based parsing that handles commented and uncommented blocks flexibly - Added
/tmpdirectory creation with sticky bit permissions (1777) in the disk image creation process
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| user/apps/tests/syscall/gvisor/enable_compile_gvisor.sh | Complete rewrite from simple sed/awk to comprehensive AWK script with block detection, error handling, backup creation, and support for partially commented gvisor configuration blocks |
| user/apps/tests/syscall/gvisor/disable_compile_gvisor.sh | Complete rewrite from simple sed to comprehensive AWK script with block detection, uncommenting logic, error handling, and backup creation |
| tools/write_disk_image.sh | Added /tmp directory creation with standard multi-user sticky bit permissions (1777) for gvisor runtime requirements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
|
这个也太复杂了 |
Signed-off-by: longjin <longjin@DragonOS.org>
fslongjin
approved these changes
Nov 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
write_disk_image.sh:创建系统镜像的时候主动创建/tmp路径,以提供给 gvisor 后续使用enable_comile_gvisor.sh:修改匹配 gvisor 集成配置代码块的逻辑,支持位置无关的 gvisor 代码块的注释。disable_compile_gvisor.sh:修改匹配 gvisor 集成配置代码块的逻辑,支持位置无关的 gvisor 代码块的接触注释Note
Replace per-action scripts with a single toggle script for gVisor tests, update Makefile/docs to use it, convert blocklist to array form, and create /tmp in the disk image.
test-syscalluseuser/apps/tests/syscall/gvisor/toggle_compile_gvisor.shfor enable/disable and ensure cleanup runs while preserving test exit status.user/apps/tests/syscall/gvisor/toggle_compile_gvisor.sh(idempotent comment/uncomment by matchingname = "gvisor syscall tests").enable_compile_gvisor.shanddisable_compile_gvisor.sh.config/app-blocklist.tomlviablocked_apps = [ ... ].docs/kernel/ktest/gvisor_syscall_test.rstto reference the new toggle script and revised workflow.tools/write_disk_image.sh: create/tmpin rootfs.Written by Cursor Bugbot for commit 24c5e88. This will update automatically on new commits. Configure here.