From 9e42ec0bac0f6b339fcb1f07704e7d13eba9b777 Mon Sep 17 00:00:00 2001 From: aLinChe <1129332011@qq.com> Date: Fri, 5 Jun 2026 11:00:39 +0800 Subject: [PATCH 1/3] feat(bwrap) Signed-off-by: aLinChe <1129332011@qq.com> --- flake.nix | 5 + tools/write_disk_image.sh | 1 + user/apps/default.nix | 10 + user/apps/tests/bwrap/.gitignore | 2 + user/apps/tests/bwrap/Makefile | 48 ++++ user/apps/tests/bwrap/default.nix | 51 ++++ user/apps/tests/bwrap/download_tests.sh | 240 ++++++++++++++++++ user/apps/tests/bwrap/run_tests.sh | 110 ++++++++ user/apps/tests/bwrap/whitelist.txt | 45 ++++ user/dadk/config/all/bwrap-0.11.1.toml | 24 ++ user/dadk/config/all/bwrap_tests-0.1.0.toml | 40 +++ .../config/sets/default/bwrap-0.11.1.toml | 1 + .../sets/default/bwrap_tests-0.1.0.toml | 1 + user/rootfs-tar.nix | 1 + 14 files changed, 579 insertions(+) create mode 100644 user/apps/tests/bwrap/.gitignore create mode 100644 user/apps/tests/bwrap/Makefile create mode 100644 user/apps/tests/bwrap/default.nix create mode 100755 user/apps/tests/bwrap/download_tests.sh create mode 100755 user/apps/tests/bwrap/run_tests.sh create mode 100644 user/apps/tests/bwrap/whitelist.txt create mode 100644 user/dadk/config/all/bwrap-0.11.1.toml create mode 100644 user/dadk/config/all/bwrap_tests-0.1.0.toml create mode 120000 user/dadk/config/sets/default/bwrap-0.11.1.toml create mode 120000 user/dadk/config/sets/default/bwrap_tests-0.1.0.toml diff --git a/flake.nix b/flake.nix index 1a9a8e021d..35ade0a1b4 100644 --- a/flake.nix +++ b/flake.nix @@ -115,6 +115,11 @@ testDir = "/opt/gvisor"; version = "20251218"; }; + bwrap = { + enable = true; + testDir = "/opt/tests/bwrap"; + version = "20260525"; + }; dunitest = { enable = true; testDir = "/opt/tests/dunitest"; diff --git a/tools/write_disk_image.sh b/tools/write_disk_image.sh index d07b424497..82bedeaa0d 100755 --- a/tools/write_disk_image.sh +++ b/tools/write_disk_image.sh @@ -133,6 +133,7 @@ mkdir -p ${mount_folder}/proc mkdir -p ${mount_folder}/usr mkdir -p ${mount_folder}/root mkdir -p ${mount_folder}/tmp +mkdir -p ${mount_folder}/var/tmp is_vfat_target() { [ "$FS_TYPE" = "vfat" ] || [ "$FS_TYPE" = "fat32" ] diff --git a/user/apps/default.nix b/user/apps/default.nix index 6c1c00ab5c..2a9585f1b3 100644 --- a/user/apps/default.nix +++ b/user/apps/default.nix @@ -62,6 +62,13 @@ let installDir = testOpt.dunitest.testDir; } ); + + bwrap-tests = ( + pkgs.callPackage ./tests/bwrap { + installDir = testOpt.bwrap.testDir; + version = testOpt.bwrap.version; + } + ); in [ (static.busybox.override { @@ -86,3 +93,6 @@ in ++ lib.optionals (target == "x86_64" && testOpt.dunitest.enable) [ dunitest ] +++ lib.optionals (target == "x86_64" && testOpt.bwrap.enable) [ + bwrap-tests +] diff --git a/user/apps/tests/bwrap/.gitignore b/user/apps/tests/bwrap/.gitignore new file mode 100644 index 0000000000..2d9d34973b --- /dev/null +++ b/user/apps/tests/bwrap/.gitignore @@ -0,0 +1,2 @@ +/tests/ +/results/ diff --git a/user/apps/tests/bwrap/Makefile b/user/apps/tests/bwrap/Makefile new file mode 100644 index 0000000000..d7709b616c --- /dev/null +++ b/user/apps/tests/bwrap/Makefile @@ -0,0 +1,48 @@ +# bubblewrap功能测试 Makefile +# 用于DragonOS项目 + +ifdef DADK_CURRENT_BUILD_DIR +INSTALL_DIR = $(DADK_CURRENT_BUILD_DIR) +else +INSTALL_DIR = ./install +endif + +.PHONY: all install install-bwrap download test clean help + +all: install + +help: + @echo "bubblewrap功能测试 Makefile" + @echo "" + @echo "可用目标:" + @echo " all - 安装测试文件(默认)" + @echo " install - 拷贝测试脚本和配置到安装目录" + @echo " install-bwrap - 仅拷贝bwrap二进制到安装目录(给DADK /bin用)" + @echo " download - 下载bwrap测试套件" + @echo " test - 在本地运行白名单中的测试" + @echo " clean - 清理安装目录" + @echo " help - 显示此帮助信息" + +download: + @./download_tests.sh --skip-if-exists + +install: download whitelist.txt + @echo "安装bwrap测试套件到 $(INSTALL_DIR)" + @mkdir -p $(INSTALL_DIR) + @cp -f whitelist.txt $(INSTALL_DIR)/ + @cp -rf tests $(INSTALL_DIR)/ + @cp -f run_tests.sh $(INSTALL_DIR)/ + @chmod +x $(INSTALL_DIR)/run_tests.sh + @echo "安装完成" + +install-bwrap: download + @mkdir -p $(INSTALL_DIR) + @cp -f tests/bwrap-static $(INSTALL_DIR)/bwrap + @chmod +x $(INSTALL_DIR)/bwrap + +test: + @BWRAP=$${BWRAP:-bwrap} /bin/sh run_tests.sh + +clean: + @rm -rf $(INSTALL_DIR) + @echo "清理完成" diff --git a/user/apps/tests/bwrap/default.nix b/user/apps/tests/bwrap/default.nix new file mode 100644 index 0000000000..9df27dcca7 --- /dev/null +++ b/user/apps/tests/bwrap/default.nix @@ -0,0 +1,51 @@ +{ + lib, + pkgs, + installDir, + version ? "20260525", +}: + +let + testsArchive = pkgs.fetchurl { + url = "https://cnb.cool/DragonOS-Community/test-suites/-/releases/download/release_${version}/bwrap-tests.tar.xz"; + sha256 = "sha256-TODO-update="; + }; + +in +pkgs.stdenv.mkDerivation { + pname = "bwrap-tests"; + version = "0.1.0"; + + src = lib.sourceByRegex ./. [ + "^whitelist\.txt$" + "^run_tests\.sh$" + ]; + + nativeBuildInputs = [ pkgs.autoPatchelfHook ]; + + buildInputs = [ pkgs.stdenv.cc.cc.lib ]; + + # Don't let Nix patchShebangs in the test scripts + dontPatchShebangs = true; + + installPhase = '' + mkdir -p $out/${installDir} + + install -m644 whitelist.txt $out/${installDir}/ + install -m755 run_tests.sh $out/${installDir}/ + + mkdir -p $out/${installDir}/tests + tar -xf ${testsArchive} -C $out/${installDir}/tests --strip-components=1 + + find $out/${installDir}/tests -type f -name '*_test' -exec chmod 755 {} \; + + # Install bwrap binary to /bin so libtest.sh can find it via PATH + mkdir -p $out/bin + install -m755 $out/${installDir}/tests/bwrap-static $out/bin/bwrap + ''; + + meta = with lib; { + description = "bubblewrap functional test suite for DragonOS"; + platforms = platforms.linux; + }; +} diff --git a/user/apps/tests/bwrap/download_tests.sh b/user/apps/tests/bwrap/download_tests.sh new file mode 100755 index 0000000000..9b368fc3c5 --- /dev/null +++ b/user/apps/tests/bwrap/download_tests.sh @@ -0,0 +1,240 @@ +#!/bin/sh + +# bubblewrap测试套件下载和校验脚本 +# 用于DragonOS项目 + +set -e + +SCRIPT_DIR=$(dirname "$(realpath "$0")") +TESTS_DIR="$SCRIPT_DIR/tests" +TEST_VERSION="20260525" +TEST_ARCHIVE="bwrap-tests.tar.xz" +BASE_URL="https://cnb.cool/DragonOS-Community/test-suites/-/releases/download" +TEST_URL="$BASE_URL/release_${TEST_VERSION}/$TEST_ARCHIVE" +MD5SUM_URL="$BASE_URL/release_${TEST_VERSION}/$TEST_ARCHIVE.md5sum" +VERSION_FILE="$TESTS_DIR/.version" + +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' + +print_info() { + echo -e "${GREEN}[INFO]${NC} $1" +} + +print_warn() { + echo -e "${YELLOW}[WARN]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +check_command() { + if ! command -v "$1" > /dev/null 2>&1; then + print_error "命令 '$1' 未找到,请安装相应软件包" + exit 1 + fi +} + +check_dependencies() { + print_info "检查依赖..." + check_command wget + check_command md5sum + check_command tar +} + +check_existing_tests() { + if [ -d "$TESTS_DIR" ]; then + local current_version="" + + if [ -f "$VERSION_FILE" ]; then + current_version=$(cat "$VERSION_FILE" 2>/dev/null || echo "") + fi + + if [ -z "$current_version" ]; then + print_warn "检测到未记录版本的测试套件,将升级到版本 $TEST_VERSION" + rm -rf "$TESTS_DIR" + return 1 + fi + + if [ "$current_version" != "$TEST_VERSION" ]; then + print_warn "检测到旧版本测试套件 (当前: $current_version),将升级到版本 $TEST_VERSION" + rm -rf "$TESTS_DIR" + return 1 + fi + + if [ -f "$TESTS_DIR/libtest.sh" ]; then + print_info "发现已存在的测试套件,版本: $current_version" + return 0 + fi + fi + + return 1 +} + +download_file() { + local url="$1" + local output="$2" + local quiet_mode="${3:-false}" + + if [ "$quiet_mode" = "true" ]; then + if wget -q -O "$output" "$url" 2>/dev/null; then + return 0 + else + return 1 + fi + else + print_info "从 $url 下载文件..." + if wget -q --show-progress -O "$output" "$url"; then + print_info "下载完成: $output" + return 0 + else + print_error "下载失败: $url" + return 1 + fi + fi +} + +get_expected_md5() { + print_info "获取期望的MD5校验和..." >&2 + local temp_md5_file=$(mktemp) + + trap "rm -f '$temp_md5_file'" RETURN + + if download_file "$MD5SUM_URL" "$temp_md5_file" "true"; then + local expected_md5=$(head -1 "$temp_md5_file" | cut -d' ' -f1) + + if [ -n "$expected_md5" ] && [ ${#expected_md5} -eq 32 ]; then + echo "$expected_md5" + return 0 + else + print_error "MD5文件格式无效或为空" >&2 + return 1 + fi + else + print_error "无法下载MD5校验和文件" >&2 + return 1 + fi +} + +verify_md5() { + local file="$1" + local expected="$2" + + print_info "验证MD5校验和..." + local actual_md5=$(md5sum "$file" | cut -d' ' -f1) + + if [ "$actual_md5" = "$expected" ]; then + print_info "MD5校验和验证成功" + return 0 + else + print_error "MD5校验和验证失败" + print_error "期望: $expected" + print_error "实际: $actual_md5" + return 1 + fi +} + +extract_tests() { + local archive="$1" + + print_info "解压测试套件..." + mkdir -p "$TESTS_DIR" + + if tar -xf "$archive" -C "$TESTS_DIR" --strip-components=1; then + print_info "解压完成" + if echo "$TEST_VERSION" > "$VERSION_FILE"; then + print_info "记录测试套件版本: $TEST_VERSION" + return 0 + else + print_error "写入版本文件失败: $VERSION_FILE" + return 1 + fi + else + print_error "解压失败" + return 1 + fi +} + +cleanup_temp_files() { + print_info "清理临时文件..." + rm -f "$SCRIPT_DIR/$TEST_ARCHIVE" +} + +main() { + local skip_if_exists=false + local force_download=false + + for arg in "$@"; do + case "$arg" in + --skip-if-exists) + skip_if_exists=true + ;; + --force-download) + force_download=true + ;; + esac + done + + print_info "开始检查和下载bubblewrap测试套件" + + check_dependencies + + if check_existing_tests; then + if [ "$skip_if_exists" = true ]; then + print_info "测试套件已存在,跳过下载" + exit 0 + elif [ "$force_download" = true ]; then + print_warn "强制重新下载,删除现有测试套件..." + rm -rf "$TESTS_DIR" + else + printf "测试套件已存在,是否重新下载?(y/N) " + read -r answer + case "$answer" in + [Yy]*) + print_warn "删除现有测试套件..." + rm -rf "$TESTS_DIR" + ;; + *) + print_info "使用现有测试套件" + exit 0 + ;; + esac + fi + fi + + if ! download_file "$TEST_URL" "$SCRIPT_DIR/$TEST_ARCHIVE"; then + exit 1 + fi + + local expected_md5 + if ! expected_md5=$(get_expected_md5); then + cleanup_temp_files + exit 1 + fi + + print_info "期望的MD5校验和: $expected_md5" + + if ! verify_md5 "$SCRIPT_DIR/$TEST_ARCHIVE" "$expected_md5"; then + cleanup_temp_files + exit 1 + fi + + if ! extract_tests "$SCRIPT_DIR/$TEST_ARCHIVE"; then + cleanup_temp_files + exit 1 + fi + + cleanup_temp_files + + local test_count=$(find "$TESTS_DIR" -name "*_test" 2>/dev/null | wc -l) + print_info "测试套件安装完成,共包含 $test_count 个测试用例" + + find "$TESTS_DIR" -name "*_test" -exec chmod +x {} \; 2>/dev/null || true + + print_info "bwrap测试套件准备就绪" +} + +main "$@" diff --git a/user/apps/tests/bwrap/run_tests.sh b/user/apps/tests/bwrap/run_tests.sh new file mode 100755 index 0000000000..bcc2e0d7ce --- /dev/null +++ b/user/apps/tests/bwrap/run_tests.sh @@ -0,0 +1,110 @@ +#!/bin/busybox sh +# DragonOS bubblewrap 功能测试运行器 +# 读取 whitelist.txt,逐个执行 tests/ 下的 *_test 脚本,按 TAP 协议判断通过/失败,最终输出带颜色的汇总结果 + +source /etc/profile + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +TESTS_DIR="$SCRIPT_DIR/tests" +WHITELIST="$SCRIPT_DIR/whitelist.txt" +TIMEOUT="${TEST_TIMEOUT:-10}" + +GREEN='\033[0;32m' +RED='\033[0;31m' +YELLOW='\033[1;33m' +NC='\033[0m' + +pass=0 +fail=0 +skip=0 +total=0 +fail_list="" + +run_one_test() { + _name="$1" + _test_file="$TESTS_DIR/$_name" + + # 测试脚本不存在,跳过 + if [ ! -x "$_test_file" ]; then + printf "${YELLOW}SKIP${NC} %s # 脚本不存在\n" "$_name" + skip=$((skip + 1)) + return + fi + + # 优先使用 timeout 命令防止卡死,没有 timeout 则直接执行 + if command -v timeout >/dev/null 2>&1; then + timeout "$TIMEOUT" "$_test_file" >/tmp/bwrap-test-out.txt 2>/tmp/bwrap-test-err.txt + _rc=$? + if [ "$_rc" -eq 124 ]; then + printf "${RED}FAIL${NC} %s # 超时 (%ds)\n" "$_name" "$TIMEOUT" + fail=$((fail + 1)) + fail_list="$fail_list $_name(超时)" + return + fi + else + "$_test_file" >/tmp/bwrap-test-out.txt 2>/tmp/bwrap-test-err.txt + _rc=$? + fi + + # 检查测试输出最后一行是否为 TAP 格式的测试计划 "1..N" + # TAP 协议:每个测试脚本以 "1..N" 结尾表示计划运行 N 个子测试,所有 "ok" 行表示通过 + _lastline="$(tail -1 /tmp/bwrap-test-out.txt)" + if echo "$_lastline" | grep -q '^1\.\.'; then + _n_ok="$(grep -c '^ok ' /tmp/bwrap-test-out.txt)" + _n_skip="$(grep -c '^ok .*# SKIP' /tmp/bwrap-test-out.txt)" + printf "${GREEN}PASS${NC} %s (通过=%d 跳过=%d)\n" "$_name" "$_n_ok" "$_n_skip" + pass=$((pass + 1)) + else + # 输出不符合 TAP 格式,视为失败,打印 stderr 前 3 行辅助排查 + printf "${RED}FAIL${NC} %s (退出码=%d)\n" "$_name" "$_rc" + grep -v '^+' /tmp/bwrap-test-err.txt 2>/dev/null | head -3 + fail=$((fail + 1)) + fail_list="$fail_list $_name" + fi +} + +# 前置检查:白名单和测试目录必须存在 +if [ ! -f "$WHITELIST" ]; then + printf "${RED}致命错误${NC} 白名单不存在: %s\n" "$WHITELIST" + exit 1 +fi + +if [ ! -d "$TESTS_DIR" ]; then + printf "${RED}致命错误${NC} 测试目录不存在: %s\n" "$TESTS_DIR" + exit 1 +fi + +# 解析白名单:跳过 # 注释行和空行,收集要运行的测试名 +test_names="" +test_count=0 +while IFS= read -r line; do + case "$line" in + '#'*|'') continue ;; + esac + test_names="$test_names $line" + test_count=$((test_count + 1)) +done < "$WHITELIST" + +printf "# 开始运行 %d 个 bubblewrap 测试,超时设置 %ds\n\n" "$test_count" "$TIMEOUT" + +# 逐个执行白名单中的测试 +total=0 +for name in $test_names; do + total=$((total + 1)) + run_one_test "$name" +done + +# 输出汇总结果 +echo "" +if [ "$fail" -eq 0 ]; then + printf "${GREEN}# 全部通过: %d/%d${NC}\n" "$pass" "$total" +else + printf "${RED}# 结果: 通过=%d 失败=%d 跳过=%d 总计=%d${NC}\n" "$pass" "$fail" "$skip" "$total" + printf "${RED}# 失败列表:%s${NC}\n" "$fail_list" +fi + +# 有失败则返回非零退出码,供上层(DADK/CI)判断 +if [ "$fail" -gt 0 ]; then + exit 1 +fi +exit 0 diff --git a/user/apps/tests/bwrap/whitelist.txt b/user/apps/tests/bwrap/whitelist.txt new file mode 100644 index 0000000000..591ff6ba03 --- /dev/null +++ b/user/apps/tests/bwrap/whitelist.txt @@ -0,0 +1,45 @@ +## bubblewrap 功能测试白名单 + +## 基本启动/帮助 +bwrap_help_test +bwrap_error_prefix_test + +## 命令行参数 +bwrap_args_fd_test +# bwrap_argv0_test # busybox sh 不支持 +bwrap_double_dash_test + +## 挂载/文件系统 +# bwrap_bind_tmp_test # cat: can't open '/tmp/bwrap-test-XXgjPHni': No such file or directory (估计是 MountList ino2mp 冲突) +bwrap_bogus_tmpfs_test +bwrap_devices_test +bwrap_mount_permissions_test +bwrap_mount_visibility_test +# bwrap_symlink_bind_test # bwrap: Can't bind mount /oldroot/ on /newroot/: Unable to find "//" in mount table +bwrap_symlink_test +# bwrap_tmpfs_permissions_test # cat: can't open '/proc/self/mountinfo': No such file or directory +bwrap_tmpfs_size_test +bwrap_overlay_test +bwrap_fuse_test +bwrap_socket_bind_test +## 目录/文件权限 +# bwrap_dir_permissions_test # File 'new-dir-permissions' doesn't match regexp '^1741$' +bwrap_dir_parent_permissions_test +bwrap_file_permissions_test +bwrap_perms_size_once_test + +## 进程管理 +bwrap_as_pid_1_test +# bwrap_die_with_parent_test # bwrap: Can't bind mount /oldroot/ on /newroot/: Unable to find "//" in mount table + +## 命名空间 +# bwrap_userns_test # bwrap: cannot open /proc/sys/user/max_user_namespaces: No such file or directory +# bwrap_basic_loop_test # loopback: Failed RTM_NEWADDR: No child process +# bwrap_recursive_ns_test # loopback: Failed RTM_NEWADDR: No child process + +## 环境变量/工作目录 +# bwrap_env_test # bwrap: execvp /usr/bin/env: No such file or directory +bwrap_chdir_test + +## 需要外部依赖/已知限制 +# bwrap_caps_test # 缺少 capsh diff --git a/user/dadk/config/all/bwrap-0.11.1.toml b/user/dadk/config/all/bwrap-0.11.1.toml new file mode 100644 index 0000000000..2102cf0e7f --- /dev/null +++ b/user/dadk/config/all/bwrap-0.11.1.toml @@ -0,0 +1,24 @@ +name = "bwrap" +version = "0.11.1" +description = "bubblewrap - OCI sandbox runtime (static binary)" +build-once = true +install-once = true +target-arch = ["x86_64"] + +[task-source] +type = "build-from-source" +source = "local" +source-path = "user/apps/tests/bwrap" + +[build] +build-command = "make install-bwrap" + +[install] +in-dragonos-path = "/bin" + +[clean] +clean-command = "make clean" + +[[depends]] +name = "bwrap tests" +version = "0.1.0" diff --git a/user/dadk/config/all/bwrap_tests-0.1.0.toml b/user/dadk/config/all/bwrap_tests-0.1.0.toml new file mode 100644 index 0000000000..6949d0a8e0 --- /dev/null +++ b/user/dadk/config/all/bwrap_tests-0.1.0.toml @@ -0,0 +1,40 @@ +# 用户程序名称 +name = "bwrap tests" +# 版本号 +version = "0.1.0" +# 用户程序描述信息 +description = "bubblewrap 功能测试套件" +# (可选)是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果 +build-once = false +# (可选) 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装 +install-once = false +# 目标架构 +# 可选值:"x86_64", "aarch64", "riscv64" +target-arch = ["x86_64"] + +# 任务源 +[task-source] +# 构建类型 +# 可选值:"build-from-source", "install-from-prebuilt" +type = "build-from-source" +# 构建来源 +# "build_from_source" 可选值:"git", "local", "archive" +# "install_from_prebuilt" 可选值:"local", "archive" +source = "local" +# 路径或URL +source-path = "user/apps/tests/bwrap" + +# 构建相关信息 +[build] +# (可选)构建命令 +build-command = "make install" + +# 安装相关信息 +[install] +# (可选)安装到DragonOS的路径 +in-dragonos-path = "/opt/tests/bwrap" + +# 清除相关信息 +[clean] +# (可选)清除命令 +clean-command = "make clean" diff --git a/user/dadk/config/sets/default/bwrap-0.11.1.toml b/user/dadk/config/sets/default/bwrap-0.11.1.toml new file mode 120000 index 0000000000..748ead3b5c --- /dev/null +++ b/user/dadk/config/sets/default/bwrap-0.11.1.toml @@ -0,0 +1 @@ +../../all/bwrap-0.11.1.toml \ No newline at end of file diff --git a/user/dadk/config/sets/default/bwrap_tests-0.1.0.toml b/user/dadk/config/sets/default/bwrap_tests-0.1.0.toml new file mode 120000 index 0000000000..414ccf2cb5 --- /dev/null +++ b/user/dadk/config/sets/default/bwrap_tests-0.1.0.toml @@ -0,0 +1 @@ +../../all/bwrap_tests-0.1.0.toml \ No newline at end of file diff --git a/user/rootfs-tar.nix b/user/rootfs-tar.nix index 49ffa5cb2d..316113f2c9 100644 --- a/user/rootfs-tar.nix +++ b/user/rootfs-tar.nix @@ -30,6 +30,7 @@ let '' mkdir -p $out $out/root cp -r $src/* $out/ + mkdir -p $out/var/tmp ''; # 使用 buildImage 创建 Docker 镜像(单层) From 33af3d1219d560cf944ef99859ae01d2352402c8 Mon Sep 17 00:00:00 2001 From: aLinChe <1129332011@qq.com> Date: Fri, 5 Jun 2026 11:18:59 +0800 Subject: [PATCH 2/3] fix(sh): use bash Signed-off-by: aLinChe <1129332011@qq.com> --- user/apps/tests/bwrap/download_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/apps/tests/bwrap/download_tests.sh b/user/apps/tests/bwrap/download_tests.sh index 9b368fc3c5..1b45a342ae 100755 --- a/user/apps/tests/bwrap/download_tests.sh +++ b/user/apps/tests/bwrap/download_tests.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # bubblewrap测试套件下载和校验脚本 # 用于DragonOS项目 From 3bd8da2d27757e50998ea2d5643b6ef0b55e3636 Mon Sep 17 00:00:00 2001 From: aLinChe <1129332011@qq.com> Date: Fri, 5 Jun 2026 11:22:38 +0800 Subject: [PATCH 3/3] fix(nix): update nix sha256 Signed-off-by: aLinChe <1129332011@qq.com> --- user/apps/tests/bwrap/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/apps/tests/bwrap/default.nix b/user/apps/tests/bwrap/default.nix index 9df27dcca7..904e74b804 100644 --- a/user/apps/tests/bwrap/default.nix +++ b/user/apps/tests/bwrap/default.nix @@ -8,7 +8,7 @@ let testsArchive = pkgs.fetchurl { url = "https://cnb.cool/DragonOS-Community/test-suites/-/releases/download/release_${version}/bwrap-tests.tar.xz"; - sha256 = "sha256-TODO-update="; + sha256 = "sha256-lN8OpxA7xMC4nVBIK82+NmUtjr6jc3IBM95g7GgFDOI="; }; in