Merge pull request #10606 from yuwata/udev-tests
test: mask hwdb-update.services in most tests
This commit is contained in:
commit
8912a99cea
|
@ -65,11 +65,11 @@ if cxx.found()
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach header : _systemd_headers + _not_installed_headers
|
foreach header : _systemd_headers + _not_installed_headers + ['../libudev/libudev.h']
|
||||||
foreach opt : opts
|
foreach opt : opts
|
||||||
name = ''.join([header, ':'] + opt)
|
name = ''.join(['cc-', header.split('/')[-1], ':'] + opt)
|
||||||
if want_tests != 'false'
|
if want_tests != 'false'
|
||||||
test('cc-' + name,
|
test(name,
|
||||||
check_compilation_sh,
|
check_compilation_sh,
|
||||||
args : cc.cmd_array() + ['-c', '-x'] + opt +
|
args : cc.cmd_array() + ['-c', '-x'] + opt +
|
||||||
['-Werror', '-include',
|
['-Werror', '-include',
|
||||||
|
|
|
@ -45,6 +45,14 @@ test_setup() {
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
|
||||||
|
# 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]
|
||||||
|
|
|
@ -19,6 +19,14 @@ test_setup() {
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
|
||||||
|
# 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]
|
||||||
|
|
|
@ -18,11 +18,18 @@ test_setup() {
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
|
||||||
|
# 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]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/test-journal.sh
|
ExecStart=/test-journal.sh
|
||||||
|
|
|
@ -18,6 +18,14 @@ test_setup() {
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
|
||||||
|
# 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]
|
||||||
DefaultLimitNOFILE=10000:16384
|
DefaultLimitNOFILE=10000:16384
|
||||||
|
@ -27,7 +35,6 @@ EOF
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/test-rlimits.sh
|
ExecStart=/test-rlimits.sh
|
||||||
|
|
|
@ -33,7 +33,6 @@ test_setup() {
|
||||||
cat <<EOF >$initdir/etc/systemd/system/testsuite.service
|
cat <<EOF >$initdir/etc/systemd/system/testsuite.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/test-selinux-checks.sh
|
ExecStart=/test-selinux-checks.sh
|
||||||
|
|
|
@ -21,11 +21,18 @@ test_setup() {
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
|
||||||
|
# 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]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/test-segfault.sh
|
ExecStart=/test-segfault.sh
|
||||||
|
|
|
@ -25,7 +25,6 @@ test_setup() {
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/bin/sh -x -c 'mount -o remount,rw /dev/sda1 && echo OK > /testok; systemctl poweroff'
|
ExecStart=/bin/sh -x -c 'mount -o remount,rw /dev/sda1 && echo OK > /testok; systemctl poweroff'
|
||||||
|
|
|
@ -24,7 +24,6 @@ test_setup() {
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
|
cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -23,7 +23,6 @@ test_setup() {
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
|
cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -20,11 +20,18 @@ test_setup() {
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
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]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/test-fail-on-restart.sh
|
ExecStart=/test-fail-on-restart.sh
|
||||||
|
|
|
@ -20,6 +20,14 @@ test_setup() {
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
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]
|
||||||
|
@ -31,7 +39,6 @@ ExecStart=/test-socket-group.sh
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
cat >$initdir/test-socket-group.sh <<'EOF'
|
cat >$initdir/test-socket-group.sh <<'EOF'
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
set -x
|
||||||
|
|
|
@ -20,6 +20,14 @@ test_setup() {
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
dracut_install busybox chmod rmdir unshare ip
|
dracut_install busybox chmod rmdir unshare ip
|
||||||
|
|
||||||
|
# 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
|
||||||
|
@ -29,7 +37,6 @@ test_setup() {
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/test-nspawn.sh
|
ExecStart=/test-nspawn.sh
|
||||||
|
|
|
@ -25,7 +25,6 @@ test_setup() {
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/bin/sh -e -x -c '/test-machine-id-setup.sh; systemctl --state=failed --no-legend --no-pager > /failed ; echo OK > /testok'
|
ExecStart=/bin/sh -e -x -c '/test-machine-id-setup.sh; systemctl --state=failed --no-legend --no-pager > /failed ; echo OK > /testok'
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/test-dropin.sh
|
ExecStart=/test-dropin.sh
|
||||||
|
|
|
@ -6,7 +6,7 @@ TEST_DESCRIPTION="UDEV SYSTEMD_WANTS property"
|
||||||
TEST_NO_NSPAWN=1
|
TEST_NO_NSPAWN=1
|
||||||
|
|
||||||
. $TEST_BASE_DIR/test-functions
|
. $TEST_BASE_DIR/test-functions
|
||||||
QEMU_TIMEOUT=180
|
QEMU_TIMEOUT=300
|
||||||
|
|
||||||
test_setup() {
|
test_setup() {
|
||||||
create_empty_image
|
create_empty_image
|
||||||
|
|
|
@ -35,6 +35,13 @@ EOF
|
||||||
) || return 1
|
) || return 1
|
||||||
setup_nspawn_root
|
setup_nspawn_root
|
||||||
|
|
||||||
|
# mask some services that we do not want to run in these tests
|
||||||
|
ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
||||||
|
ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
||||||
|
ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
||||||
|
ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
||||||
|
ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
||||||
|
|
||||||
ddebug "umount $TESTDIR/root"
|
ddebug "umount $TESTDIR/root"
|
||||||
umount $TESTDIR/root
|
umount $TESTDIR/root
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,14 @@ test_setup() {
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
|
||||||
|
# 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]
|
||||||
|
|
|
@ -17,6 +17,14 @@ test_setup() {
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
|
||||||
|
# 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]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Testsuite service
|
Description=Testsuite service
|
||||||
After=multi-user.target
|
After=systemd-tmpfiles-setup.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/testsuite
|
WorkingDirectory=/testsuite
|
||||||
|
|
|
@ -17,6 +17,14 @@ test_setup() {
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
|
|
||||||
|
# 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]
|
||||||
|
|
Loading…
Reference in a new issue