Skip to content

runner: sync exec/wait and strict syscall trace progress

WangHotpnT requested to merge feature/runner into main

本次 MR 内容

本 MR 同步当前 feature/runner 分支进度,方便主线统一 review 和后续排查 QEMU 9.2.1 环境下的行为。

当前已完成:

  1. runner 可读取 /glibc/basic_testcode.sh
  2. runner 可解析:
    • program = /glibc/busybox
    • argv[0] = busybox
    • argv[1] = echo
    • argv[2] = #### OS COMP TEST GROUP START basic-glibc ####
  3. runner 已接入 kernel_execve / kernel_wait4
  4. execve 可从 EXT4 读取 /glibc/busybox ELF;
  5. boot-context spawn 可返回 pid=1
  6. wait4 可回收 child;
  7. runner 可打印 test command done
  8. strict syscall trace 当前已能命中:
    • openat
    • read
    • close
    • fstat
    • getdents64
    • dup3
    • getppid
    • brk

当前本地验证现象

在我本地 QEMU 8.2.2 环境下:

  • QEMU exit_code.txt = 0
  • check_ours_log.py --strict-syscalls 已通过
  • 但 busybox 仍可能出现 SIGILL=-4

队友环境中 QEMU 6.2.0 结果不同;当前团队计划统一使用 QEMU 9.2.1,因此本 MR 先合入当前同步代码,后续由主线统一在 QEMU 9.2.1 下验证。

验证命令

cd oskernel && make clean && make kernel-rv -j$(nproc) && cd ..
rm -f logs/ours/qemu.log logs/ours/exit_code.txt
QEMU=$(which qemu-system-riscv64) bash scripts/run_ours.sh
python3 scripts/check_ours_log.py --log logs/ours/qemu.log --strict-syscalls

Merge request reports