2020-03-04 10:35:06 +01:00
|
|
|
#!/usr/bin/env bash
|
2017-08-07 21:09:21 +02:00
|
|
|
set -e
|
2015-11-23 18:56:45 +01:00
|
|
|
TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/1981"
|
2017-08-04 14:34:14 +02:00
|
|
|
TEST_NO_QEMU=1
|
2015-11-23 18:56:45 +01:00
|
|
|
|
|
|
|
. $TEST_BASE_DIR/test-functions
|
|
|
|
|
2019-10-24 04:08:48 +02:00
|
|
|
NSPAWN_TIMEOUT=30
|
2016-06-24 16:23:39 +02:00
|
|
|
|
2015-11-23 18:56:45 +01:00
|
|
|
test_setup() {
|
2019-07-12 17:47:26 +02:00
|
|
|
create_empty_image_rootdir
|
2015-11-23 18:56:45 +01:00
|
|
|
|
|
|
|
# Create what will eventually be our root filesystem onto an overlay
|
|
|
|
(
|
|
|
|
LOG_LEVEL=5
|
|
|
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
|
|
|
|
|
|
|
setup_basic_environment
|
2019-10-08 09:10:12 +02:00
|
|
|
mask_supporting_services
|
2018-11-01 09:26:36 +01:00
|
|
|
|
2015-11-23 18:56:45 +01:00
|
|
|
# setup the testsuite service
|
|
|
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
|
|
|
[Unit]
|
|
|
|
Description=Testsuite service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStart=/test-segfault.sh
|
|
|
|
Type=oneshot
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cp test-segfault.sh $initdir/
|
|
|
|
|
|
|
|
setup_testsuite
|
2019-07-08 21:11:32 +02:00
|
|
|
)
|
2015-11-23 18:56:45 +01:00
|
|
|
setup_nspawn_root
|
|
|
|
}
|
|
|
|
|
|
|
|
do_test "$@"
|