Skip to content

Commit 056ae88

Browse files
committed
test: mask several unnecessary services
This may make CIs run faster.
1 parent f775f61 commit 056ae88

File tree

12 files changed

+95
-0
lines changed

12 files changed

+95
-0
lines changed

test/TEST-02-CRYPTSETUP/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ test_setup() {
4545

4646
setup_basic_environment
4747

48+
# mask some services that we do not want to run in these tests
49+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
50+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
51+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
52+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
53+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
54+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
55+
4856
# setup the testsuite service
4957
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
5058
[Unit]

test/TEST-03-JOBS/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ test_setup() {
1919

2020
setup_basic_environment
2121

22+
# mask some services that we do not want to run in these tests
23+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
24+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
25+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
26+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
27+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
28+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
29+
2230
# setup the testsuite service
2331
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
2432
[Unit]

test/TEST-04-JOURNAL/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ test_setup() {
1818

1919
setup_basic_environment
2020

21+
# mask some services that we do not want to run in these tests
22+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
23+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
24+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
25+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
26+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
27+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
28+
2129
# setup the testsuite service
2230
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
2331
[Unit]

test/TEST-05-RLIMITS/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ test_setup() {
1818

1919
setup_basic_environment
2020

21+
# mask some services that we do not want to run in these tests
22+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
23+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
24+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
25+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
26+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
27+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
28+
2129
cat >$initdir/etc/systemd/system.conf <<EOF
2230
[Manager]
2331
DefaultLimitNOFILE=10000:16384

test/TEST-07-ISSUE-1981/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ test_setup() {
2121

2222
setup_basic_environment
2323

24+
# mask some services that we do not want to run in these tests
25+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
26+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
27+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
28+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
29+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
30+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
31+
2432
# setup the testsuite service
2533
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
2634
[Unit]

test/TEST-11-ISSUE-3166/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ test_setup() {
2020
setup_basic_environment
2121
dracut_install false touch
2222

23+
# mask some services that we do not want to run in these tests
24+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
25+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
26+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
27+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
28+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
29+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
30+
2331
# setup the testsuite service
2432
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
2533
[Unit]

test/TEST-12-ISSUE-3171/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ test_setup() {
2020
setup_basic_environment
2121
dracut_install cat mv stat nc
2222

23+
# mask some services that we do not want to run in these tests
24+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
25+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
26+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
27+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
28+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
29+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
30+
2331
# setup the testsuite service
2432
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
2533
[Unit]

test/TEST-13-NSPAWN-SMOKE/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ test_setup() {
2020
setup_basic_environment
2121
dracut_install busybox chmod rmdir unshare ip
2222

23+
# mask some services that we do not want to run in these tests
24+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
25+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
26+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
27+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
28+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
29+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
30+
2331
cp create-busybox-container $initdir/
2432

2533
./create-busybox-container $initdir/nc-container

test/TEST-18-FAILUREACTION/test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ EOF
3535
) || return 1
3636
setup_nspawn_root
3737

38+
# mask some services that we do not want to run in these tests
39+
ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
40+
ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
41+
ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service
42+
ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
43+
ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service
44+
3845
ddebug "umount $TESTDIR/root"
3946
umount $TESTDIR/root
4047
}

test/TEST-19-DELEGATE/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ test_setup() {
2020

2121
setup_basic_environment
2222

23+
# mask some services that we do not want to run in these tests
24+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
25+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
26+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
27+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
28+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
29+
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
30+
2331
# setup the testsuite service
2432
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
2533
[Unit]

0 commit comments

Comments
 (0)