Skip to content

Commit 8d65fab

Browse files
authored
run-gnu-tests-smack-ci.sh: Avoid another network error
1 parent 0b437e9 commit 8d65fab

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

util/run-gnu-tests-smack-ci.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ echo "Setting up SMACK/ROOTFS test environment..."
1515
rm -rf "$QEMU_DIR"
1616
mkdir -p "$QEMU_DIR"/{rootfs/{bin,lib64,proc,sys,dev,tmp,etc,gnu},kernel}
1717

18-
# Copy Ubuntu kernel (runner's kernel does not work)
18+
# Use Ubuntu kernel and busybox (runner's kernel is missing smack)
1919
sudo apt-get update || :
20-
sudo apt-get install -y linux-image-generic
20+
sudo apt-get install -y --no-install-recommends linux-image-generic busybox-static
2121
sudo install -Dvm644 "$(ls -1 /boot/vmlinuz-*-generic | head -n 1)" "$QEMU_DIR/kernel/vmlinuz"
2222

2323
# Setup busybox
24-
BUSYBOX=/tmp/busybox
25-
[ -f "$BUSYBOX" ] || curl -sL -o "$BUSYBOX" https://busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox
26-
chmod +x "$BUSYBOX"
27-
cp "$BUSYBOX" "$QEMU_DIR/rootfs/bin/"
28-
(cd "$QEMU_DIR/rootfs/bin" && "$BUSYBOX" --list | xargs -I{} ln -sf busybox {} 2>/dev/null)
24+
BUSYBOX=/bin/busybox
25+
install -Dm755 "$BUSYBOX" -t "$QEMU_DIR/rootfs/bin"
26+
(cd "$QEMU_DIR/rootfs/bin" && ./busybox --list | xargs -I{} ln -sf busybox {} 2>/dev/null)
2927

3028
# Copy required libraries
3129
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
104102

105103
# Hardlink utilities for SMACK/ROOTFS tests
106104
for U in $("$REPO_DIR/target/${PROFILE}/coreutils" --list); do
107-
ln -vf "$REPO_DIR/target/${PROFILE}/coreutils" "$WORK/bin/$U"
105+
ln -f "$REPO_DIR/target/${PROFILE}/coreutils" "$WORK/bin/$U"
108106
done
109107

110108
# Set test script path and user

0 commit comments

Comments
 (0)