Skip to content

Commit 8e65bb7

Browse files
committed
Merge remote-tracking branch 'origin/master' into jiangruizhi-fix/sys_pread64
2 parents 94d0a91 + 53df56c commit 8e65bb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2152
-444
lines changed

.github/workflows/makefile.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
name: Format check ${{ matrix.arch }}
1212
runs-on: ubuntu-latest
1313
continue-on-error: true
14-
container: dragonos/dragonos-dev:v1.16
14+
container: dragonos/dragonos-dev:v1.17
1515

1616
strategy:
1717
matrix:
1818
arch: [x86_64, riscv64, loongarch64]
1919

2020
steps:
21-
- run: echo "Running in dragonos/dragonos-dev:v1.16"
21+
- run: echo "Running in dragonos/dragonos-dev:v1.17"
2222
- uses: actions/checkout@v3
2323

2424
- name: Format check
@@ -36,14 +36,14 @@ jobs:
3636
name: Kernel static test ${{ matrix.arch }}
3737
runs-on: ubuntu-latest
3838
continue-on-error: true
39-
container: dragonos/dragonos-dev:v1.16
39+
container: dragonos/dragonos-dev:v1.17
4040

4141
strategy:
4242
matrix:
4343
arch: [x86_64, riscv64, loongarch64]
4444

4545
steps:
46-
- run: echo "Running in dragonos/dragonos-dev:v1.16"
46+
- run: echo "Running in dragonos/dragonos-dev:v1.17"
4747

4848
- uses: actions/checkout@v3
4949

@@ -57,7 +57,7 @@ jobs:
5757
build:
5858
name: Build ${{ matrix.arch }}
5959
runs-on: ubuntu-latest
60-
container: dragonos/dragonos-dev:v1.16
60+
container: dragonos/dragonos-dev:v1.17
6161
continue-on-error: true
6262
strategy:
6363
matrix:
@@ -74,7 +74,7 @@ jobs:
7474
checkout_params: {}
7575

7676
steps:
77-
- run: echo "Running in dragonos/dragonos-dev:v1.16"
77+
- run: echo "Running in dragonos/dragonos-dev:v1.17"
7878

7979
- uses: actions/checkout@v3
8080
with: ${{ matrix.checkout_params }}

.github/workflows/test-x86.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
timeout-minutes: 60
2121
container:
22-
image: dragonos/dragonos-dev:v1.16
22+
image: dragonos/dragonos-dev:v1.17
2323
options: --privileged -v /dev:/dev
2424
steps:
2525
- name: Checkout DragonOS code
@@ -32,15 +32,15 @@ jobs:
3232
make -j$(nproc) all
3333
3434
- name: Run syscall test
35+
id: test-syscall
3536
shell: bash -ileo pipefail {0}
36-
continue-on-error: true
3737
env:
3838
DISK_SAVE_MODE: "1"
3939
run: |
4040
make test-syscall
4141
4242
- name: Upload test results
43-
if: github.repository == 'DragonOS-Community/DragonOS'
43+
if: always() && github.repository == 'DragonOS-Community/DragonOS'
4444
shell: bash -ileo pipefail {0}
4545
env:
4646
API_KEY: ${{ secrets.CI_DASHBOARD_UPLOAD_API_KEY }}
@@ -69,22 +69,28 @@ jobs:
6969
BRANCH_NAME="${{ github.head_ref }}"
7070
fi
7171
72-
# 检查API_KEY是否存在
73-
if [ -z "$API_KEY" ]; then
74-
echo "警告: CI_DASHBOARD_UPLOAD_API_KEY secret未设置,跳过上传"
75-
exit 0
76-
fi
77-
7872
# 检查日志文件是否存在
7973
if [ ! -f "serial_opt.txt" ]; then
8074
echo "警告: serial_opt.txt文件不存在,跳过上传"
8175
exit 0
8276
fi
8377
84-
# 上传测试结果
85-
python3 tools/test-upload/parse_and_upload.py \
86-
serial_opt.txt \
87-
"$API_URL" \
88-
--branch "$BRANCH_NAME" \
89-
--commit "$COMMIT_ID" \
90-
--test-type "gvisor"
78+
# 检查API_KEY是否存在,如果不存在则使用dry-run模式
79+
if [ -z "$API_KEY" ]; then
80+
echo "警告: CI_DASHBOARD_UPLOAD_API_KEY secret未设置,使用dry-run模式"
81+
python3 tools/test-upload/parse_and_upload.py \
82+
serial_opt.txt \
83+
"$API_URL" \
84+
--branch "$BRANCH_NAME" \
85+
--commit "$COMMIT_ID" \
86+
--test-type "gvisor" \
87+
--dry-run
88+
else
89+
# 上传测试结果
90+
python3 tools/test-upload/parse_and_upload.py \
91+
serial_opt.txt \
92+
"$API_URL" \
93+
--branch "$BRANCH_NAME" \
94+
--commit "$COMMIT_ID" \
95+
--test-type "gvisor"
96+
fi

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ run-docker: check_arch
155155

156156
test-syscall: check_arch
157157
@echo "构建运行并执行syscall测试"
158-
bash user/apps/tests/syscall/gvisor/enable_compile_gvisor.sh
158+
bash user/apps/tests/syscall/gvisor/toggle_compile_gvisor.sh enable
159159
$(MAKE) all -j $(NPROCS)
160160
@if [ "$(DISK_SAVE_MODE)" = "1" ]; then \
161161
echo "磁盘节省模式启用,正在清理用户程序构建缓存..."; \
@@ -164,8 +164,12 @@ test-syscall: check_arch
164164
$(MAKE) write_diskimage || exit 1
165165
$(MAKE) qemu-nographic AUTO_TEST=syscall SYSCALL_TEST_DIR=/opt/tests/gvisor &
166166
sleep 5
167-
bash user/apps/tests/syscall/gvisor/monitor_test_results.sh || { bash user/apps/tests/syscall/gvisor/disable_compile_gvisor.sh; exit 1; }
168-
bash user/apps/tests/syscall/gvisor/disable_compile_gvisor.sh
167+
@{ \
168+
status=0; \
169+
bash user/apps/tests/syscall/gvisor/monitor_test_results.sh || status=$$?; \
170+
bash user/apps/tests/syscall/gvisor/toggle_compile_gvisor.sh disable; \
171+
exit $$status; \
172+
}
169173

170174
fmt: check_arch
171175
@echo "格式化代码"

config/app-blocklist.toml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,10 @@ log_skipped = true
6262
# - reason:屏蔽原因说明(可选,建议提供以便调试和维护)
6363

6464
# 屏蔽gvisor系统调用测试
65-
[[blocked_apps]]
66-
name = "gvisor syscall tests"
67-
reason = "由于文件较大,因此屏蔽。如果要允许系统调用测试,则把这几行取消注释即可"
68-
69-
[[blocked_apps]]
70-
name = "NovaShell"
71-
reason = "工具链版本有问题,应为nightly-2025-8-10"
72-
73-
[[blocked_apps]]
74-
name = "test_ebpf_new"
75-
reason = "2025.11.17,aya上游发版有问题,导致ci过不了,暂时禁用"
76-
77-
[[blocked_apps]]
78-
name = "test_ebpf_tp"
79-
reason = "2025.11.17,aya上游发版有问题,导致ci过不了,暂时禁用"
65+
blocked_apps = [
66+
{ name = "gvisor syscall tests", reason = "由于文件较大,因此屏蔽。如果要允许系统调用测试,则把这行取消注释即可" },
67+
{ name = "NovaShell", reason = "工具链版本有问题,应为nightly-2025-8-10" },
68+
{ name = "test_ebpf_new", reason = "2025.11.17,aya上游发版有问题,导致ci过不了,暂时禁用" },
69+
{ name = "test_ebpf_tp", reason = "2025.11.17,aya上游发版有问题,导致ci过不了,暂时禁用" },
70+
]
8071

docs/.translation_cache.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
"hash": "8b840ec6af5782d8f793f746b1061ed9"
265265
},
266266
"en:index.rst": {
267-
"hash": "58f858acd19efc845ebef5dd55ec8375"
267+
"hash": "139ea63381896ae9f861c37ca13c888d"
268268
},
269269
"en:questions/index.rst": {
270270
"hash": "b1cee9bfde04d6375f24c93a29ce3c71"
@@ -282,7 +282,7 @@
282282
"hash": "de9331f8d0bc5fe8c4705ad5807c9e8d"
283283
},
284284
"en:kernel/net/index.rst": {
285-
"hash": "3fe30ab290231ef4507a358d86fb3021"
285+
"hash": "2b7f07b2896787800e902f9f4bb5d2e4"
286286
},
287287
"en:kernel/net/inet.md": {
288288
"hash": "549622e87eeafbeae8fed7f84aba5db9"
@@ -294,7 +294,7 @@
294294
"hash": "52df04d6a276b42617f7b79bbbffa61e"
295295
},
296296
"en:kernel/ktest/gvisor_syscall_test.rst": {
297-
"hash": "bfa0b1f0bcb791573c73670df23cbb32"
297+
"hash": "60cc96606ccd50bb3e669b378693b742"
298298
},
299299
"en:kernel/syscall/sys_capget_capset.md": {
300300
"hash": "f3b86c00e9f28df5c0e6c15905e53907"
@@ -310,5 +310,8 @@
310310
},
311311
"en:community/ChangeLog/V0.3.x/V0.3.0.md": {
312312
"hash": "a3b5ae01c7a5f3ad9d26f71b54d01790"
313+
},
314+
"en:kernel/net/ssh.md": {
315+
"hash": "7ebf2f5934c0ef1ff4f922e48d5d1748"
313316
}
314317
}

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
kernel/net/index
4949
kernel/trace/index
5050
kernel/syscall/index
51+
kernel/device/index
5152

5253

5354

docs/kernel/ktest/gvisor_syscall_test.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ gVisor 是 Google 开发的容器运行时沙箱,包含了大量的系统调
2121

2222
执行`make test-syscall`命令。该命令将启动DragonOS并自动执行gvisor syscall测试套件,测试完成后会退出qemu。同时根据测试用例成功率选择是成功返回还是失败返回,成功率不等于100%则失败返回。该命令的执行流程如下:
2323

24-
1. 执行`enable_compile_gvisor.sh`注释`app-blocklist.toml`中有关于屏蔽gvisor测试套的配置
24+
1. 执行 `toggle_compile_gvisor.sh enable` 注释 `app-blocklist.toml` 中与 gvisor 测试套件相关的屏蔽配置
2525
2. 编译DragonOS
2626
3. 写入镜像
2727
4. 后台qemu无图形模式启动DragonOS,同时设置环境变量`AUTO_TEST`(自动测试选项,目前仅支持syscall测试)和`SYSCALL_TEST_DIR`(测试套所在目录),这两个环境变量会通过命令行参数传递到DragonOS。然后当busybox init进程执行rcS脚本时,该脚本会通过`AUTO_TEST`选项执行对应的测试
2828
5. 执行`monitor_test_results.sh`定时查看qemu串口输出内容,并根据测试结果选择成功返回还是失败返回
29-
6. 执行`disable_compile_gvisor.sh`取消`app-blocklist.toml`中有关于屏蔽gvisor测试套的配置注释
29+
6. 执行 `toggle_compile_gvisor.sh disable` 取消 `app-blocklist.toml` 中相关配置的注释,恢复默认屏蔽状态
3030

3131
对应的workflow配置文件为`test-x86.yml`
3232

@@ -45,16 +45,15 @@ gVisor 是 Google 开发的容器运行时沙箱,包含了大量的系统调
4545
4646
make test
4747
48-
3. 如果需要运行测试,请先修改配置文件
48+
3. 如果需要运行测试,可通过脚本快速修改配置
4949

50-
编辑 `config/app-blocklist.toml`,注释掉以下内容:
50+
.. code-block:: bash
5151
52-
.. code-block:: toml
52+
# 启用 gVisor 测试(注释 blocklist 配置)
53+
bash user/apps/tests/syscall/gvisor/toggle_compile_gvisor.sh enable
5354
54-
# 屏蔽gvisor系统调用测试
55-
# [[blocked_apps]]
56-
# name = "gvisor syscall tests"
57-
# reason = "由于文件较大,因此屏蔽。如果要允许系统调用测试,则把这几行取消注释即可"
55+
# 测试完成后恢复默认屏蔽
56+
bash user/apps/tests/syscall/gvisor/toggle_compile_gvisor.sh disable
5857
5958
4. 在 DragonOS 系统内运行测试:
6059

docs/kernel/net/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ DragonOS 网络子系统
66
:maxdepth: 1
77

88
inet
9-
unix
9+
unix
10+
ssh

0 commit comments

Comments
 (0)