mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
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
|
||||
|
||||
foreach header : _systemd_headers + _not_installed_headers
|
||||
foreach header : _systemd_headers + _not_installed_headers + ['../libudev/libudev.h']
|
||||
foreach opt : opts
|
||||
name = ''.join([header, ':'] + opt)
|
||||
name = ''.join(['cc-', header.split('/')[-1], ':'] + opt)
|
||||
if want_tests != 'false'
|
||||
test('cc-' + name,
|
||||
test(name,
|
||||
check_compilation_sh,
|
||||
args : cc.cmd_array() + ['-c', '-x'] + opt +
|
||||
['-Werror', '-include',
|
||||
|
@ -45,6 +45,14 @@ test_setup() {
|
||||
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
|
@ -19,6 +19,14 @@ test_setup() {
|
||||
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
|
@ -18,11 +18,18 @@ test_setup() {
|
||||
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/test-journal.sh
|
||||
|
@ -18,6 +18,14 @@ test_setup() {
|
||||
|
||||
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
|
||||
[Manager]
|
||||
DefaultLimitNOFILE=10000:16384
|
||||
@ -27,7 +35,6 @@ EOF
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/test-rlimits.sh
|
||||
|
@ -33,7 +33,6 @@ test_setup() {
|
||||
cat <<EOF >$initdir/etc/systemd/system/testsuite.service
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/test-selinux-checks.sh
|
||||
|
@ -21,11 +21,18 @@ test_setup() {
|
||||
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/test-segfault.sh
|
||||
|
@ -25,7 +25,6 @@ test_setup() {
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
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'
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
@ -23,7 +23,6 @@ test_setup() {
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
@ -20,11 +20,18 @@ test_setup() {
|
||||
setup_basic_environment
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/test-fail-on-restart.sh
|
||||
|
@ -20,6 +20,14 @@ test_setup() {
|
||||
setup_basic_environment
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
@ -31,7 +39,6 @@ ExecStart=/test-socket-group.sh
|
||||
Type=oneshot
|
||||
EOF
|
||||
|
||||
|
||||
cat >$initdir/test-socket-group.sh <<'EOF'
|
||||
#!/bin/bash
|
||||
set -x
|
||||
|
@ -20,6 +20,14 @@ test_setup() {
|
||||
setup_basic_environment
|
||||
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/
|
||||
|
||||
./create-busybox-container $initdir/nc-container
|
||||
@ -29,7 +37,6 @@ test_setup() {
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/test-nspawn.sh
|
||||
|
@ -25,7 +25,6 @@ test_setup() {
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
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]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/test-dropin.sh
|
||||
|
@ -6,7 +6,7 @@ TEST_DESCRIPTION="UDEV SYSTEMD_WANTS property"
|
||||
TEST_NO_NSPAWN=1
|
||||
|
||||
. $TEST_BASE_DIR/test-functions
|
||||
QEMU_TIMEOUT=180
|
||||
QEMU_TIMEOUT=300
|
||||
|
||||
test_setup() {
|
||||
create_empty_image
|
||||
|
@ -35,6 +35,13 @@ EOF
|
||||
) || return 1
|
||||
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"
|
||||
umount $TESTDIR/root
|
||||
}
|
||||
|
@ -20,6 +20,14 @@ test_setup() {
|
||||
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
|
@ -17,6 +17,14 @@ test_setup() {
|
||||
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=Testsuite service
|
||||
After=multi-user.target
|
||||
After=systemd-tmpfiles-setup.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/testsuite
|
||||
|
@ -17,6 +17,14 @@ test_setup() {
|
||||
|
||||
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
|
||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
||||
[Unit]
|
||||
|
Loading…
Reference in New Issue
Block a user