test.sh revision 09f6f45a29d8691b67152d4e6f5bbb1453be778e
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
. $TEST_BASE_DIR/test-functions
dwarn "skipping QEMU"
if check_nspawn; then
timeout --foreground 30s systemd-nspawn --kill-signal=SIGKILL --boot --directory=$TESTDIR/nspawn-root $ROOTLIBDIR/systemd $KERNEL_APPEND
check_result_nspawn || return 1
else
dwarn "can't run systemd-nspawn, skipping"
fi
return 0
}
# Create what will eventually be our root filesystem onto an overlay
(
# setup the testsuite service
[Unit]
Description=Testsuite service
After=multi-user.target
[Service]
ExecStart=/test-segfault.sh
Type=oneshot
EOF
) || return 1
}
return 0
}
do_test "$@"