mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 16:59:07 +08:00
vmtest: update root fs, whitelist sk_{assign|lookup} test
1. Update mkrootfs.sh building root fs - Remove /etc/fstab from root fs and mount each fs type separately in S10-mount script. - devtmpfs can be already mounted prior to S10-mount execution so make it opt-out. This addresses [0]. - set -eux for scripts 2. Add iproute2 to root fs and whitelist sk_assign test. Addresses [1][2]. Update INDEX file with 2020-09-27 version. [0] https://github.com/libbpf/libbpf/pull/145#issuecomment-609673493 [1] https://github.com/libbpf/libbpf/pull/144 [2] https://github.com/libbpf/libbpf/pull/145
This commit is contained in:
committed by
Andrii Nakryiko
parent
37c5973bb7
commit
99921245f0
@@ -1,5 +1,5 @@
|
||||
INDEX https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX
|
||||
libbpf-vmtest-rootfs-2020.03.11.tar.zst https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/libbpf-vmtest-rootfs-2020.03.11.tar.zst
|
||||
libbpf-vmtest-rootfs-2020.09.27.tar.zst https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/libbpf-vmtest-rootfs-2020.09.27.tar.zst
|
||||
vmlinux-4.9.0.zst https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/vmlinux-4.9.0.zst
|
||||
vmlinux-5.5.0-rc6.zst https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/vmlinux-5.5.0-rc6.zst
|
||||
vmlinux-5.5.0.zst https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/vmlinux-5.5.0.zst
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# TEMPORARILY DISABLED
|
||||
send_signal # flaky
|
||||
test_lsm # semi-working
|
||||
sk_assign # needs better setup in Travis CI
|
||||
sk_lookup
|
||||
core_reloc # temporary test breakage
|
||||
bpf_verif_scale # clang regression
|
||||
|
||||
@@ -81,6 +81,7 @@ packages=(
|
||||
binutils
|
||||
elfutils
|
||||
glibc
|
||||
iproute2
|
||||
# selftests test_verifier dependencies.
|
||||
libcap
|
||||
)
|
||||
@@ -101,15 +102,6 @@ rm -rf "$root/usr/share/{doc,help,man,texinfo}"
|
||||
|
||||
chroot "${root}" /bin/busybox --install
|
||||
|
||||
cat > "$root/etc/fstab" << "EOF"
|
||||
dev /dev devtmpfs rw,nosuid 0 0
|
||||
proc /proc proc rw,nosuid,nodev,noexec 0 0
|
||||
sys /sys sysfs rw,nosuid,nodev,noexec 0 0
|
||||
debugfs /sys/kernel/debug debugfs mode=755,realtime 0 0
|
||||
bpffs /sys/fs/bpf bpf realtime 0 0
|
||||
EOF
|
||||
chmod 644 "$root/etc/fstab"
|
||||
|
||||
cat > "$root/etc/inittab" << "EOF"
|
||||
::sysinit:/etc/init.d/rcS
|
||||
::ctrlaltdel:/sbin/reboot
|
||||
@@ -123,13 +115,29 @@ mkdir -m 755 "$root/etc/init.d" "$root/etc/rcS.d"
|
||||
cat > "$root/etc/rcS.d/S10-mount" << "EOF"
|
||||
#!/bin/sh
|
||||
|
||||
/bin/mount -a
|
||||
set -eux
|
||||
|
||||
/bin/mount proc /proc -t proc
|
||||
|
||||
# Mount devtmpfs if not mounted
|
||||
if [[ -z $(/bin/mount -l -t devtmpfs) ]]; then
|
||||
/bin/mount devtmpfs /dev -t devtmpfs
|
||||
fi
|
||||
|
||||
/bin/mount sysfs /sys -t sysfs
|
||||
/bin/mount bpffs /sys/fs/bpf -t bpf
|
||||
/bin/mount debugfs /sys/kernel/debug -t debugfs
|
||||
|
||||
echo 'Listing currently mounted file systems'
|
||||
/bin/mount
|
||||
EOF
|
||||
chmod 755 "$root/etc/rcS.d/S10-mount"
|
||||
|
||||
cat > "$root/etc/rcS.d/S40-network" << "EOF"
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
ip link set lo up
|
||||
EOF
|
||||
chmod 755 "$root/etc/rcS.d/S40-network"
|
||||
@@ -137,6 +145,8 @@ chmod 755 "$root/etc/rcS.d/S40-network"
|
||||
cat > "$root/etc/init.d/rcS" << "EOF"
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
for path in /etc/rcS.d/S*; do
|
||||
[ -x "$path" ] && "$path"
|
||||
done
|
||||
|
||||
@@ -411,7 +411,7 @@ if [[ ! -z SETUPCMD ]]; then
|
||||
if [[ -v BUILDDIR ]]; then kernel='latest'; fi
|
||||
setup_envvars="export KERNEL=${kernel}"
|
||||
setup_script=$(printf "#!/bin/sh
|
||||
set -e
|
||||
set -eux
|
||||
|
||||
echo 'Running setup commands'
|
||||
%s
|
||||
|
||||
Reference in New Issue
Block a user