mirror of
https://github.com/systemd/systemd
synced 2024-10-06 16:21:34 +00:00
test: add function to reduce copied setup boilerplate
Many tests were also masking systemd-machined.service. But machined should only start when activated, so having it not masked shouldn't be noticable. TEST-25-IMPORT needs it.
This commit is contained in:
parent
0f714a34c4
commit
51fa85913c
|
@ -40,14 +40,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -14,14 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -13,14 +13,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -13,14 +13,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
cat >$initdir/etc/systemd/system.conf <<EOF
|
cat >$initdir/etc/systemd/system.conf <<EOF
|
||||||
[Manager]
|
[Manager]
|
||||||
|
|
|
@ -24,6 +24,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat <<EOF >$initdir/etc/systemd/system/testsuite.service
|
cat <<EOF >$initdir/etc/systemd/system/testsuite.service
|
||||||
|
@ -91,13 +92,6 @@ EOF
|
||||||
dracut_install runcon
|
dracut_install runcon
|
||||||
dracut_install checkmodule semodule semodule_package m4 make /usr/libexec/selinux/hll/pp load_policy sefcontext_compile
|
dracut_install checkmodule semodule semodule_package m4 make /usr/libexec/selinux/hll/pp load_policy sefcontext_compile
|
||||||
)
|
)
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_test "$@"
|
do_test "$@"
|
||||||
|
|
|
@ -16,14 +16,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -64,12 +64,7 @@ EOF
|
||||||
mkdir -p $initdir/etc/systemd/system/local-fs.target.wants
|
mkdir -p $initdir/etc/systemd/system/local-fs.target.wants
|
||||||
ln -s /etc/systemd/system/-.mount $initdir/etc/systemd/system/local-fs.target.wants/-.mount
|
ln -s /etc/systemd/system/-.mount $initdir/etc/systemd/system/local-fs.target.wants/-.mount
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
mask_supporting_services
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_test "$@"
|
do_test "$@"
|
||||||
|
|
|
@ -15,6 +15,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
|
cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
|
||||||
|
@ -31,13 +32,6 @@ EOF
|
||||||
|
|
||||||
setup_testsuite
|
setup_testsuite
|
||||||
)
|
)
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_test "$@"
|
do_test "$@"
|
||||||
|
|
|
@ -13,6 +13,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
dracut_install true rm socat
|
dracut_install true rm socat
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
|
@ -42,13 +43,6 @@ EOF
|
||||||
setup_testsuite
|
setup_testsuite
|
||||||
)
|
)
|
||||||
setup_nspawn_root
|
setup_nspawn_root
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_test "$@"
|
do_test "$@"
|
||||||
|
|
|
@ -14,16 +14,9 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
dracut_install false touch
|
dracut_install false touch
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
|
@ -14,16 +14,9 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
dracut_install cat mv stat nc
|
dracut_install cat mv stat nc
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
|
@ -14,16 +14,9 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
dracut_install busybox chmod rmdir unshare ip sysctl
|
dracut_install busybox chmod rmdir unshare ip sysctl
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
cp create-busybox-container $initdir/
|
cp create-busybox-container $initdir/
|
||||||
|
|
||||||
./create-busybox-container $initdir/nc-container
|
./create-busybox-container $initdir/nc-container
|
||||||
|
|
|
@ -14,6 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
printf "556f48e837bc4424a710fa2e2c9d3e3c\ne3d\n" >$initdir/etc/machine-id
|
printf "556f48e837bc4424a710fa2e2c9d3e3c\ne3d\n" >$initdir/etc/machine-id
|
||||||
dracut_install mount cmp
|
dracut_install mount cmp
|
||||||
|
|
||||||
|
@ -72,13 +73,6 @@ chmod +x $initdir/test-machine-id-setup.sh
|
||||||
|
|
||||||
setup_testsuite
|
setup_testsuite
|
||||||
)
|
)
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_test "$@"
|
do_test "$@"
|
||||||
|
|
|
@ -8,13 +8,7 @@ TEST_NO_QEMU=1
|
||||||
test_setup() {
|
test_setup() {
|
||||||
# create the basic filesystem layout
|
# create the basic filesystem layout
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
|
|
||||||
# import the test scripts in the rootfs and plug them in systemd
|
# import the test scripts in the rootfs and plug them in systemd
|
||||||
cp testsuite.service $initdir/etc/systemd/system/
|
cp testsuite.service $initdir/etc/systemd/system/
|
||||||
|
|
|
@ -14,6 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
|
|
||||||
for s in success-all success-start success-stop success-runtime \
|
for s in success-all success-start success-stop success-runtime \
|
||||||
fail-start fail-stop fail-runtime
|
fail-start fail-stop fail-runtime
|
||||||
|
@ -27,12 +28,6 @@ test_setup() {
|
||||||
|
|
||||||
setup_testsuite
|
setup_testsuite
|
||||||
)
|
)
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
|
|
||||||
setup_nspawn_root
|
setup_nspawn_root
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,13 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -13,6 +13,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
@ -27,14 +28,8 @@ EOF
|
||||||
|
|
||||||
setup_testsuite
|
setup_testsuite
|
||||||
)
|
)
|
||||||
setup_nspawn_root
|
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
setup_nspawn_root
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_test "$@"
|
do_test "$@"
|
||||||
|
|
|
@ -15,14 +15,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -12,14 +12,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
@ -35,6 +28,7 @@ EOF
|
||||||
|
|
||||||
setup_testsuite
|
setup_testsuite
|
||||||
)
|
)
|
||||||
|
|
||||||
setup_nspawn_root
|
setup_nspawn_root
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ TEST_NO_QEMU=1
|
||||||
test_setup() {
|
test_setup() {
|
||||||
# create the basic filesystem layout
|
# create the basic filesystem layout
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
inst_binary mv
|
inst_binary mv
|
||||||
inst_binary stat
|
inst_binary stat
|
||||||
inst_binary seq
|
inst_binary seq
|
||||||
|
@ -15,14 +16,6 @@ test_setup() {
|
||||||
inst_binary mkfifo
|
inst_binary mkfifo
|
||||||
inst_binary readlink
|
inst_binary readlink
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cp testsuite.service $initdir/etc/systemd/system/
|
cp testsuite.service $initdir/etc/systemd/system/
|
||||||
setup_testsuite
|
setup_testsuite
|
||||||
|
|
|
@ -12,14 +12,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -11,17 +11,9 @@ test_setup() {
|
||||||
LOG_LEVEL=5
|
LOG_LEVEL=5
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
inst_binary cmp
|
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
inst_binary cmp
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -14,6 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
|
|
||||||
# Set up the services.
|
# Set up the services.
|
||||||
cat >$initdir/etc/systemd/system/specifier-j-wants.service << EOF
|
cat >$initdir/etc/systemd/system/specifier-j-wants.service << EOF
|
||||||
|
@ -48,14 +49,8 @@ EOF
|
||||||
|
|
||||||
setup_testsuite
|
setup_testsuite
|
||||||
)
|
)
|
||||||
setup_nspawn_root
|
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
setup_nspawn_root
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_test "$@"
|
do_test "$@"
|
||||||
|
|
|
@ -14,13 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -16,14 +16,7 @@ test_setup() {
|
||||||
inst_any /usr/share/zoneinfo/Europe/Berlin
|
inst_any /usr/share/zoneinfo/Europe/Berlin
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# extend the watchdog
|
# extend the watchdog
|
||||||
mkdir -p $initdir/etc/systemd/system/systemd-timedated.service.d
|
mkdir -p $initdir/etc/systemd/system/systemd-timedated.service.d
|
||||||
|
|
|
@ -14,13 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -15,14 +15,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -14,14 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -12,14 +12,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -15,16 +15,9 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
dracut_install mktemp
|
dracut_install mktemp
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
|
@ -14,14 +14,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -13,16 +13,9 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
dracut_install mktemp
|
dracut_install mktemp
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
|
@ -12,14 +12,7 @@ test_setup() {
|
||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
mask_supporting_services
|
||||||
# mask some services that we do not want to run in these tests
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
||||||
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
||||||
|
|
||||||
# setup the testsuite service
|
# setup the testsuite service
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
|
|
|
@ -913,6 +913,15 @@ setup_basic_dirs() {
|
||||||
ln -sfn /run/lock "$initdir/var/lock"
|
ln -sfn /run/lock "$initdir/var/lock"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mask_supporting_services() {
|
||||||
|
# mask some services that we do not want to run in these tests
|
||||||
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
||||||
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
||||||
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
||||||
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
||||||
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
||||||
|
}
|
||||||
|
|
||||||
inst_libs() {
|
inst_libs() {
|
||||||
local _bin=$1
|
local _bin=$1
|
||||||
local _so_regex='([^ ]*/lib[^/]*/[^ ]*\.so[^ ]*)'
|
local _so_regex='([^ ]*/lib[^/]*/[^ ]*\.so[^ ]*)'
|
||||||
|
|
Loading…
Reference in a new issue