#!/bin/sh # run upstream system integration tests via mkosi set -e set -x cleanup () { if [ -f "${workdir}/btrfs/build/meson-logs/testlog.txt" ]; then cp "${workdir}/btrfs/build/meson-logs/testlog.txt" "$AUTOPKGTEST_ARTIFACTS" fi if [ -d "${workdir}/btrfs/build/test/journal" ]; then cp -r "${workdir}/btrfs/build/test/journal" "$AUTOPKGTEST_ARTIFACTS" fi if [ -n "$workdir" ]; then umount "$workdir/btrfs" || true losetup --detach "$loop" || true rm -rf "$workdir" fi } # apparmor is not compatible with swtpm aa-teardown >/dev/null 2>&1 || true # we need user namespaces for some tests running in nspawn sysctl -we kernel.apparmor_restrict_unprivileged_unconfined=0 sysctl -we kernel.apparmor_restrict_unprivileged_userns=0 mkdir -p /run/systemd/resolved.conf.d/ tee /run/systemd/resolved.conf.d/dns.conf <