From 73536629c9aebbc2c1db1c206812bd838471e5ac Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Thu, 19 Mar 2026 19:37:19 +0900 Subject: [PATCH] run-gnu-tests-smack-ci.sh: Avoid another network error --- util/run-gnu-tests-smack-ci.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/util/run-gnu-tests-smack-ci.sh b/util/run-gnu-tests-smack-ci.sh index e37e29ca3fa..415d5148dfe 100755 --- a/util/run-gnu-tests-smack-ci.sh +++ b/util/run-gnu-tests-smack-ci.sh @@ -15,17 +15,15 @@ echo "Setting up SMACK/ROOTFS test environment..." rm -rf "$QEMU_DIR" mkdir -p "$QEMU_DIR"/{rootfs/{bin,lib64,proc,sys,dev,tmp,etc,gnu},kernel} -# Copy Ubuntu kernel (runner's kernel does not work) +# Use Ubuntu kernel and busybox (runner's kernel is missing smack) sudo apt-get update || : -sudo apt-get install -y linux-image-generic +sudo apt-get install -y --no-install-recommends linux-image-generic busybox #-static sudo install -Dvm644 "$(ls -1 /boot/vmlinuz-*-generic | head -n 1)" "$QEMU_DIR/kernel/vmlinuz" # Setup busybox -BUSYBOX=/tmp/busybox -[ -f "$BUSYBOX" ] || curl -sL -o "$BUSYBOX" https://busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox -chmod +x "$BUSYBOX" -cp "$BUSYBOX" "$QEMU_DIR/rootfs/bin/" -(cd "$QEMU_DIR/rootfs/bin" && "$BUSYBOX" --list | xargs -I{} ln -sf busybox {} 2>/dev/null) +BUSYBOX=/bin/busybox +install -Dm755 "$BUSYBOX" -t "$QEMU_DIR/rootfs/bin" +(cd "$QEMU_DIR/rootfs/bin" && ./busybox --list | xargs -I{} ln -sf busybox {} 2>/dev/null) # Copy required libraries for lib in ld-linux-x86-64.so.2 libc.so.6 libm.so.6 libgcc_s.so.1 libpthread.so.0 libdl.so.2 librt.so.1; do @@ -104,7 +102,7 @@ for TEST_PATH in $QEMU_TESTS; do # Hardlink utilities for SMACK/ROOTFS tests for U in $("$REPO_DIR/target/${PROFILE}/coreutils" --list); do - ln -vf "$REPO_DIR/target/${PROFILE}/coreutils" "$WORK/bin/$U" + ln -f "$REPO_DIR/target/${PROFILE}/coreutils" "$WORK/bin/$U" done # Set test script path and user