2020-03-04 09:35:06 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-03-15 11:26:45 +00:00
|
|
|
set -e
|
|
|
|
TEST_DESCRIPTION="plugged -> dead -> plugged issue #11997"
|
|
|
|
TEST_NO_NSPAWN=1
|
|
|
|
|
|
|
|
. $TEST_BASE_DIR/test-functions
|
|
|
|
QEMU_TIMEOUT=300
|
|
|
|
|
|
|
|
test_setup() {
|
2019-07-12 15:47:26 +00:00
|
|
|
create_empty_image_rootdir
|
2019-03-15 11:26:45 +00:00
|
|
|
|
|
|
|
(
|
|
|
|
LOG_LEVEL=5
|
|
|
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
|
|
|
|
|
|
|
setup_basic_environment
|
2019-10-08 07:10:12 +00:00
|
|
|
mask_supporting_services
|
2019-03-15 11:26:45 +00:00
|
|
|
|
|
|
|
# setup the testsuite service
|
|
|
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
|
|
|
[Unit]
|
|
|
|
Description=Testsuite service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStart=/bin/bash -x /testsuite.sh
|
|
|
|
Type=oneshot
|
|
|
|
EOF
|
|
|
|
cp testsuite.sh $initdir/
|
|
|
|
|
|
|
|
setup_testsuite
|
2019-07-08 19:11:32 +00:00
|
|
|
)
|
2019-03-15 11:26:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_test "$@"
|