2017-11-18 17:32:01 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1+
|
|
|
|
#
|
|
|
|
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
|
|
|
|
|
2017-04-14 00:47:20 +00:00
|
|
|
test_data_files = '''
|
2017-04-17 23:25:00 +00:00
|
|
|
a.service
|
|
|
|
b.service
|
2017-10-11 12:07:51 +00:00
|
|
|
basic.target
|
2017-04-17 23:25:00 +00:00
|
|
|
c.service
|
|
|
|
d.service
|
2017-10-11 12:07:51 +00:00
|
|
|
daughter.service
|
2017-04-17 23:25:00 +00:00
|
|
|
e.service
|
2017-10-11 12:07:51 +00:00
|
|
|
end.service
|
2017-04-17 23:25:00 +00:00
|
|
|
f.service
|
|
|
|
g.service
|
2017-10-11 12:07:51 +00:00
|
|
|
grandchild.service
|
|
|
|
h.service
|
2017-04-17 23:25:00 +00:00
|
|
|
hello-after-sleep.target
|
|
|
|
hello.service
|
2017-10-11 12:07:51 +00:00
|
|
|
hwdb/10-bad.hwdb
|
|
|
|
journal-data/journal-1.txt
|
|
|
|
journal-data/journal-2.txt
|
2017-04-17 23:25:00 +00:00
|
|
|
parent-deep.slice
|
|
|
|
parent.slice
|
|
|
|
sched_idle_bad.service
|
|
|
|
sched_idle_ok.service
|
|
|
|
sched_rr_bad.service
|
|
|
|
sched_rr_change.service
|
|
|
|
sched_rr_ok.service
|
|
|
|
shutdown.target
|
|
|
|
sleep.service
|
|
|
|
sockets.target
|
|
|
|
son.service
|
|
|
|
sysinit.target
|
2018-03-25 18:50:15 +00:00
|
|
|
test-execute/exec-basic.service
|
2018-03-03 13:15:36 +00:00
|
|
|
test-execute/exec-ambientcapabilities-merge-nfsnobody.service
|
|
|
|
test-execute/exec-ambientcapabilities-merge-nobody.service
|
|
|
|
test-execute/exec-ambientcapabilities-merge.service
|
|
|
|
test-execute/exec-ambientcapabilities-nfsnobody.service
|
|
|
|
test-execute/exec-ambientcapabilities-nobody.service
|
|
|
|
test-execute/exec-ambientcapabilities.service
|
2017-12-05 15:36:55 +00:00
|
|
|
test-execute/exec-bindpaths.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-capabilityboundingset-invert.service
|
|
|
|
test-execute/exec-capabilityboundingset-merge.service
|
|
|
|
test-execute/exec-capabilityboundingset-reset.service
|
|
|
|
test-execute/exec-capabilityboundingset-simple.service
|
2017-12-06 01:44:20 +00:00
|
|
|
test-execute/exec-cpuaffinity1.service
|
|
|
|
test-execute/exec-cpuaffinity2.service
|
|
|
|
test-execute/exec-cpuaffinity3.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service
|
|
|
|
test-execute/exec-dynamicuser-fixeduser.service
|
2017-12-03 05:27:32 +00:00
|
|
|
test-execute/exec-dynamicuser-statedir-migrate-step1.service
|
|
|
|
test-execute/exec-dynamicuser-statedir-migrate-step2.service
|
2017-12-05 15:36:55 +00:00
|
|
|
test-execute/exec-dynamicuser-statedir.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-dynamicuser-supplementarygroups.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-environment-empty.service
|
|
|
|
test-execute/exec-environment-multiple.service
|
|
|
|
test-execute/exec-environment.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-environmentfile.service
|
|
|
|
test-execute/exec-group-nfsnobody.service
|
2018-03-02 06:55:02 +00:00
|
|
|
test-execute/exec-group-nobody.service
|
2017-12-05 09:59:44 +00:00
|
|
|
test-execute/exec-group-nogroup.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-group.service
|
|
|
|
test-execute/exec-ignoresigpipe-no.service
|
|
|
|
test-execute/exec-ignoresigpipe-yes.service
|
|
|
|
test-execute/exec-inaccessiblepaths-mount-propagation.service
|
|
|
|
test-execute/exec-inaccessiblepaths-proc.service
|
|
|
|
test-execute/exec-ioschedulingclass-best-effort.service
|
|
|
|
test-execute/exec-ioschedulingclass-idle.service
|
|
|
|
test-execute/exec-ioschedulingclass-none.service
|
|
|
|
test-execute/exec-ioschedulingclass-realtime.service
|
|
|
|
test-execute/exec-oomscoreadjust-negative.service
|
|
|
|
test-execute/exec-oomscoreadjust-positive.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-passenvironment-absent.service
|
|
|
|
test-execute/exec-passenvironment-empty.service
|
|
|
|
test-execute/exec-passenvironment-repeated.service
|
|
|
|
test-execute/exec-passenvironment.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-personality-aarch64.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-personality-ppc64.service
|
|
|
|
test-execute/exec-personality-ppc64le.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-personality-s390.service
|
|
|
|
test-execute/exec-personality-x86-64.service
|
|
|
|
test-execute/exec-personality-x86.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-privatedevices-no-capability-mknod.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-privatedevices-no-capability-sys-rawio.service
|
|
|
|
test-execute/exec-privatedevices-no.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-privatedevices-yes-capability-mknod.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-privatedevices-yes-capability-sys-rawio.service
|
|
|
|
test-execute/exec-privatedevices-yes.service
|
|
|
|
test-execute/exec-privatenetwork-yes.service
|
|
|
|
test-execute/exec-privatetmp-no.service
|
|
|
|
test-execute/exec-privatetmp-yes.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-protectkernelmodules-no-capabilities.service
|
|
|
|
test-execute/exec-protectkernelmodules-yes-capabilities.service
|
|
|
|
test-execute/exec-protectkernelmodules-yes-mount-propagation.service
|
|
|
|
test-execute/exec-readonlypaths-mount-propagation.service
|
2017-12-05 15:36:55 +00:00
|
|
|
test-execute/exec-readonlypaths-simple.service
|
2017-10-28 06:35:19 +00:00
|
|
|
test-execute/exec-readonlypaths-with-bindpaths.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-readonlypaths.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-readwritepaths-mount-propagation.service
|
2017-12-05 15:36:55 +00:00
|
|
|
test-execute/exec-restrictnamespaces-mnt-blacklist.service
|
|
|
|
test-execute/exec-restrictnamespaces-mnt.service
|
|
|
|
test-execute/exec-restrictnamespaces-no.service
|
|
|
|
test-execute/exec-restrictnamespaces-yes.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-runtimedirectory-mode.service
|
|
|
|
test-execute/exec-runtimedirectory-owner-nfsnobody.service
|
2018-03-02 06:55:02 +00:00
|
|
|
test-execute/exec-runtimedirectory-owner-nobody.service
|
2018-03-01 09:31:26 +00:00
|
|
|
test-execute/exec-runtimedirectory-owner-nogroup.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-runtimedirectory-owner.service
|
|
|
|
test-execute/exec-runtimedirectory.service
|
2017-12-05 15:36:55 +00:00
|
|
|
test-execute/exec-specifier-interpolation.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-specifier.service
|
2017-11-24 09:17:28 +00:00
|
|
|
test-execute/exec-specifier@.service
|
2017-12-05 15:36:55 +00:00
|
|
|
test-execute/exec-standardinput-data.service
|
|
|
|
test-execute/exec-standardinput-file.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-supplementarygroups-multiple-groups-default-group-user.service
|
|
|
|
test-execute/exec-supplementarygroups-multiple-groups-withgid.service
|
|
|
|
test-execute/exec-supplementarygroups-multiple-groups-withuid.service
|
|
|
|
test-execute/exec-supplementarygroups-single-group-user.service
|
|
|
|
test-execute/exec-supplementarygroups-single-group.service
|
|
|
|
test-execute/exec-supplementarygroups.service
|
2017-11-11 12:41:05 +00:00
|
|
|
test-execute/exec-systemcallerrornumber-name.service
|
|
|
|
test-execute/exec-systemcallerrornumber-number.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-systemcallfilter-failing.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-systemcallfilter-failing2.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-systemcallfilter-not-failing.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-systemcallfilter-not-failing2.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-systemcallfilter-system-user-nfsnobody.service
|
2018-03-02 06:55:02 +00:00
|
|
|
test-execute/exec-systemcallfilter-system-user-nobody.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-systemcallfilter-system-user.service
|
2017-11-11 12:39:02 +00:00
|
|
|
test-execute/exec-systemcallfilter-with-errno-name.service
|
|
|
|
test-execute/exec-systemcallfilter-with-errno-number.service
|
2018-02-20 07:50:12 +00:00
|
|
|
test-execute/exec-temporaryfilesystem-options.service
|
|
|
|
test-execute/exec-temporaryfilesystem-ro.service
|
|
|
|
test-execute/exec-temporaryfilesystem-rw.service
|
|
|
|
test-execute/exec-temporaryfilesystem-usr.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-umask-0177.service
|
|
|
|
test-execute/exec-umask-default.service
|
2017-12-05 15:36:55 +00:00
|
|
|
test-execute/exec-unsetenvironment.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-user-nfsnobody.service
|
2018-03-02 06:55:02 +00:00
|
|
|
test-execute/exec-user-nobody.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-execute/exec-user.service
|
2017-04-17 23:25:00 +00:00
|
|
|
test-execute/exec-workingdirectory.service
|
2017-10-11 12:07:51 +00:00
|
|
|
test-path/basic.target
|
|
|
|
test-path/path-changed.path
|
|
|
|
test-path/path-changed.service
|
|
|
|
test-path/path-directorynotempty.path
|
|
|
|
test-path/path-directorynotempty.service
|
|
|
|
test-path/path-exists.path
|
|
|
|
test-path/path-exists.service
|
|
|
|
test-path/path-existsglob.path
|
|
|
|
test-path/path-existsglob.service
|
|
|
|
test-path/path-makedirectory.path
|
|
|
|
test-path/path-makedirectory.service
|
|
|
|
test-path/path-modified.path
|
|
|
|
test-path/path-modified.service
|
|
|
|
test-path/path-mycustomunit.service
|
|
|
|
test-path/path-service.service
|
|
|
|
test-path/path-unit.path
|
|
|
|
test-path/paths.target
|
|
|
|
test-path/sysinit.target
|
2018-03-14 10:03:36 +00:00
|
|
|
test-umount/empty.mountinfo
|
2018-03-21 18:55:54 +00:00
|
|
|
test-umount/example.swaps
|
2018-03-14 10:03:36 +00:00
|
|
|
test-umount/garbled.mountinfo
|
|
|
|
test-umount/rhbug-1554943.mountinfo
|
2018-03-21 18:55:54 +00:00
|
|
|
testsuite.target
|
|
|
|
timers.target
|
|
|
|
unit-with-.service.d/20-override.conf
|
|
|
|
unit-with-multiple-.service.d/20-override.conf
|
|
|
|
unit-with-multiple-.service.d/30-override.conf
|
|
|
|
unit-with-multiple-dashes.service
|
|
|
|
unit-with-multiple-dashes.service.d/10-override.conf
|
|
|
|
unstoppable.service
|
2017-04-14 00:47:20 +00:00
|
|
|
'''.split()
|
|
|
|
|
2017-10-03 11:12:29 +00:00
|
|
|
if conf.get('ENABLE_RESOLVE') == 1
|
2017-04-17 23:25:00 +00:00
|
|
|
test_data_files += '''
|
|
|
|
test-resolve/_openpgpkey.fedoraproject.org.pkts
|
|
|
|
test-resolve/fedoraproject.org.pkts
|
|
|
|
test-resolve/gandi.net.pkts
|
|
|
|
test-resolve/google.com.pkts
|
|
|
|
test-resolve/root.pkts
|
|
|
|
test-resolve/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
|
|
|
|
test-resolve/teamits.com.pkts
|
|
|
|
test-resolve/zbyszek@fedoraproject.org.pkts
|
|
|
|
test-resolve/_443._tcp.fedoraproject.org.pkts
|
|
|
|
test-resolve/kyhwana.org.pkts
|
|
|
|
test-resolve/fake-caa.pkts
|
|
|
|
'''.split()
|
2017-04-14 00:47:20 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if install_tests
|
2017-04-17 23:25:00 +00:00
|
|
|
foreach file : test_data_files
|
|
|
|
subdir = file.split('/')[0]
|
|
|
|
if subdir == file
|
|
|
|
subdir = ''
|
|
|
|
endif
|
2017-04-14 00:47:20 +00:00
|
|
|
|
2017-04-17 23:25:00 +00:00
|
|
|
install_data(file,
|
|
|
|
install_dir : testsdir + '/testdata/' + subdir)
|
|
|
|
endforeach
|
2017-04-14 00:47:20 +00:00
|
|
|
endif
|
2017-07-13 23:21:40 +00:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
2017-11-22 11:42:28 +00:00
|
|
|
rule_syntax_check_py = find_program('rule-syntax-check.py')
|
|
|
|
test('rule-syntax-check',
|
|
|
|
rule_syntax_check_py,
|
|
|
|
args : all_rules)
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
2017-10-08 20:14:45 +00:00
|
|
|
if conf.get('HAVE_SYSV_COMPAT') == 1
|
|
|
|
sysv_generator_test_py = find_program('sysv-generator-test.py')
|
|
|
|
test('sysv-generator-test',
|
|
|
|
sysv_generator_test_py)
|
|
|
|
endif
|
2017-09-26 11:39:43 +00:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
# prepare test/sys tree
|
|
|
|
sys_script_py = find_program('sys-script.py')
|
|
|
|
custom_target(
|
|
|
|
'sys',
|
|
|
|
command : [sys_script_py, meson.current_build_dir()],
|
|
|
|
output : 'sys',
|
|
|
|
build_by_default : true)
|
|
|
|
|
2018-03-22 07:34:21 +00:00
|
|
|
if perl.found()
|
|
|
|
udev_test_pl = find_program('udev-test.pl')
|
|
|
|
test('udev-test',
|
|
|
|
udev_test_pl)
|
|
|
|
else
|
|
|
|
message('Skipping udev-test because perl is not available')
|
|
|
|
endif
|
2017-09-26 11:44:04 +00:00
|
|
|
|
2017-10-08 20:14:45 +00:00
|
|
|
if conf.get('ENABLE_HWDB') == 1
|
|
|
|
hwdb_test_sh = find_program('hwdb-test.sh')
|
|
|
|
test('hwdb-test',
|
2017-11-26 12:20:08 +00:00
|
|
|
hwdb_test_sh,
|
|
|
|
timeout : 90)
|
2017-10-08 20:14:45 +00:00
|
|
|
endif
|
2018-01-19 06:54:30 +00:00
|
|
|
|
|
|
|
subdir('fuzz-regressions')
|