]>
Commit | Line | Data |
---|---|---|
8f1500a9 EV |
1 | #!/bin/bash |
2 | set -eux | |
3 | set -o pipefail | |
4 | ||
2a5b9cd6 | 5 | export ASAN_OPTIONS=detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:strict_string_checks=1 |
8f1500a9 EV |
6 | |
7 | # https://github.com/lxc/lxc/issues/3757 | |
8 | ASAN_OPTIONS="$ASAN_OPTIONS:detect_odr_violation=0" | |
9 | ||
10 | export UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 | |
11 | ||
56878587 | 12 | apt-get update -qq |
8f1500a9 | 13 | apt-get install --yes --no-install-recommends \ |
b4b1f149 | 14 | apparmor bash-completion bridge-utils build-essential \ |
8f1500a9 | 15 | busybox-static clang cloud-image-utils curl dbus debhelper debootstrap \ |
aec7c9c2 | 16 | devscripts dnsmasq-base docbook2x doxygen ed fakeroot file gcc graphviz \ |
b4b1f149 | 17 | git iptables meson net-tools libapparmor-dev libcap-dev libgnutls28-dev liblua5.2-dev \ |
8f1500a9 EV |
18 | libpam0g-dev libseccomp-dev libselinux1-dev libtool linux-libc-dev \ |
19 | llvm lsb-release make openssl pkg-config python3-all-dev \ | |
20 | python3-setuptools rsync squashfs-tools uidmap unzip uuid-runtime \ | |
c55353f8 | 21 | wget xz-utils systemd-coredump libsystemd-dev |
0fd92707 | 22 | apt-get remove --yes lxc-utils liblxc-common liblxc1 liblxc-dev |
8f1500a9 | 23 | |
b4b1f149 | 24 | ARGS="-Dprefix=/usr -Dtests=true -Dpam-cgroup=false -Dwerror=true -Dio-uring-event-loop=false -Db_lto_mode=default -Db_lundef=false" |
1667e14e | 25 | case "$CC" in clang*) |
b4b1f149 | 26 | ARGS="$ARGS -Db_sanitize=address,undefined" |
1667e14e | 27 | esac |
b4b1f149 CB |
28 | meson setup san_build $ARGS |
29 | ninja -C san_build | |
30 | ninja -C san_build install | |
8f1500a9 | 31 | |
02c7e7af EV |
32 | cat <<'EOF' >/usr/bin/lxc-test-share-ns |
33 | #!/bin/bash | |
34 | printf "The test is skipped due to https://github.com/lxc/lxc/issues/3798.\n" | |
35 | EOF | |
36 | ||
335a1405 EV |
37 | mv /usr/bin/{lxc-test-concurrent,test-concurrent.orig} |
38 | cat <<EOF >/usr/bin/lxc-test-concurrent | |
39 | #!/bin/bash | |
40 | printf "Memory leaks are ignored due to https://github.com/lxc/lxc/issues/3788.\n" | |
41 | ASAN_OPTIONS=$ASAN_OPTIONS:detect_leaks=0 UBSAN_OPTIONS=$UBSAN_OPTIONS /usr/bin/test-concurrent.orig | |
42 | EOF | |
43 | chmod +x /usr/bin/lxc-test-concurrent | |
44 | ||
8f1500a9 EV |
45 | sed -i 's/USE_LXC_BRIDGE="false"/USE_LXC_BRIDGE="true"/' /etc/default/lxc |
46 | systemctl daemon-reload | |
47 | systemctl restart apparmor | |
48 | systemctl restart lxc-net | |
49 | ||
4188864e SG |
50 | # Undo default ACLs from Github |
51 | setfacl -b -R /home | |
52 | ||
8f1500a9 | 53 | git clone --depth=1 https://github.com/lxc/lxc-ci |
935dc9a0 | 54 | timeout 30m bash -x lxc-ci/deps/lxc-exercise |