Systemd/src/test
Giedrius Statkevičius c90c597ee3 verify: ignore nonexistent executables if required
We provide a way via the '-' symbol to ignore errors when nonexistent
executable files are passed to Exec* parameters & so on. In such a case,
the flag `EXEC_COMMAND_IGNORE_FAILURE` is set and we go on happily with
our life if that happens. However, `systemd-analyze verify` complained
about missing executables even in such a case. In such a case it is not
an error for this to happen so check if the flag is set before checking
if the file is accessible and executable.

Add some small tests to check this condition.

Closes #15218.
2020-04-14 21:23:31 +02:00
..
generate-sym-test.py journal: properly mark two definitions that are deprecated with GCC attributes for that 2020-01-31 15:02:00 +01:00
meson.build verify: ignore nonexistent executables if required 2020-04-14 21:23:31 +02:00
test-acl-util.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
test-af-list.c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
test-alloc-util.c test: modernize test-alloc-util.c test a bit 2019-07-12 09:11:44 +02:00
test-architecture.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-arphrd-list.c basic/arphrd: stop discriminating against NETROM and CISCO 2019-09-25 12:17:51 +02:00
test-ask-password-api.c shared/ask-password-api: show "(press TAB for no echo)" 2020-02-06 10:51:24 +01:00
test-async.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
test-barrier.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
test-bitmap.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-boot-timestamps.c util-lib: split shared/efivars into basic/efivars and shared/efi-loader 2019-09-16 18:08:53 +02:00
test-bpf-devices.c test-bpf-devices: skip test on !unified 2019-11-11 21:05:08 +01:00
test-bpf-firewall.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-btrfs.c tree-wide: fix spelling of lookup and setup verbs 2020-03-03 15:02:53 +01:00
test-bus-util.c bus-util: drop now-unused functions 2018-09-20 16:52:02 +02:00
test-calendarspec.c tree-wide: fix how we set $TZ 2019-11-13 12:30:22 +01:00
test-cap-list.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
test-capability.c test-capability: Modify ambient capability tests to test clearing caps 2019-11-27 10:57:21 -08:00
test-cgroup-cpu.c core: add CPUQuotaPeriodSec= 2019-02-14 11:04:42 -08:00
test-cgroup-mask.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-cgroup-setup.c util-lib: move some functions from basic/cgroup-util to shared/cgroup-setup 2019-09-16 18:08:00 +02:00
test-cgroup-unit-default.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-cgroup-util.c tests: get rid of test-helper.[ch] completely 2019-11-11 14:55:57 +01:00
test-cgroup.c test-cgroup: do not require root to pass 2020-03-10 15:53:39 +01:00
test-chase-symlinks.c basic/fs-util: change CHASE_OPEN flag into a separate output parameter 2019-10-24 22:44:24 +09:00
test-chown-rec.c core: drop suid/sgid bit of files/dirs when doing recursive chown 2019-03-26 08:29:37 +01:00
test-clock.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
test-condition.c test-condition: fix group check condition 2019-12-26 12:07:54 +09:00
test-conf-files.c basic/conf-files: make conf_files_list() take just a single directory 2019-09-16 09:15:05 +02:00
test-conf-parser.c network,udev: use uint64_t for bit rate 2020-01-21 16:51:19 +01:00
test-copy.c test-copy: test that xattrs are properly copied 2019-11-19 15:44:58 +01:00
test-coredump-util.c Add parser and printer for coredump filter mask 2020-04-09 12:51:41 +02:00
test-cpu-set-util.c core: add support for setting CPUAffinity= to special "numa" value 2020-03-16 08:57:28 +01:00
test-daemon.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
test-date.c tree-wide: drop double newline 2019-11-04 00:30:32 +09:00
test-dev-setup.c core: create inaccessible nodes for users when making runtime dirs 2019-12-18 11:09:30 -08:00
test-device-nodes.c tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
test-dissect-image.c dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
test-dlopen.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
test-dns-domain.c resolve: reject host names with leading or trailing dashes in /etc/hosts 2018-12-10 09:56:56 +01:00
test-ellipsize.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-emergency-action.c units: allow and use SuccessAction=exit-force in system systemd-exit.service 2018-10-17 19:32:07 +02:00
test-engine.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-env-file.c test-unit-file: move some tests to new test-env-file.c 2019-07-19 16:51:14 +02:00
test-env-util.c tree-wide: drop double newline 2019-11-04 00:30:32 +09:00
test-escape.c shared/escape: add new escape style with \n\t escaped 2020-04-09 09:58:10 +02:00
test-exec-util.c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
test-execute.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-exit-status.c tree-wide: various code-formatting improvements 2019-09-22 07:17:27 +02:00
test-extract-word.c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
test-fd-util.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
test-fdset.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
test-fileio.c test-fileio: fix bogus error when /proc/cmdline contains newlines 2020-03-28 11:46:47 +01:00
test-firewall-util.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-format-table.c test-format-table: add tests for TABLE_STRV 2020-01-15 11:52:40 +09:00
test-format-util.c test: fix argument type of test_format_bytes_one() 2019-06-27 10:31:55 +09:00
test-fs-util.c basic/fs-util: add a version of chmod_and_chown that doesn not use /proc 2020-03-03 11:56:44 +01:00
test-fstab-util.c core: swap priority can be negative 2019-12-04 08:57:08 +01:00
test-gcrypt-util.c Fix SPDX license tags 2018-06-14 13:05:41 +02:00
test-glob-util.c tree-wide: drop glob.h when glob-util.h is included 2019-11-04 00:30:32 +09:00
test-hash.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-hashmap-ordered.awk
test-hashmap-plain.c test-hashmap: move tests which should also apply to ordered hashmaps and add comment 2019-07-19 16:51:14 +02:00
test-hashmap.c test-hashmap: move tests which should also apply to ordered hashmaps and add comment 2019-07-19 16:51:14 +02:00
test-hexdecoct.c Delete duplicate lines 2019-01-12 16:02:26 +01:00
test-hostname-util.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
test-hostname.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-id128.c id128: introduce ID128_UUID_STRING_MAX for sizing UUID buffers 2019-12-10 11:56:18 +01:00
test-in-addr-util.c test: add tests for test_in_addr_prefix_to_string() 2019-03-04 23:45:07 +09:00
test-install-root.c Rename _PATH variables to _DIR when they refer to a directory 2020-03-27 20:12:45 +01:00
test-install.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-io-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-ip-protocol-list.c test: add tests for ip_protocol_{from,to}_name() 2018-12-02 06:13:47 +01:00
test-ipcrm.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-job-type.c core: add helper function to check job status 2019-10-01 15:05:27 +02:00
test-journal-importer.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-json.c json: add concept of normalization 2019-12-02 09:47:00 +01:00
test-libmount.c Add helper function for mnt_table_parse_{stream,mtab} 2019-04-23 23:29:29 +02:00
test-libudev.c tree-wide: drop stdio.h when stdio-util.h is included 2019-11-04 00:30:32 +09:00
test-list.c tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
test-load-fragment.c shared/conf-parser: remove unnecessary whitespace skipping 2019-11-27 13:56:28 +01:00
test-local-addresses.c netlink: move local-addresses.[ch] to src/shared 2019-07-24 09:06:50 +02:00
test-locale-util.c locale-util: extend comments on unicode glyph use, and drop mdash (that actually was an ndash) 2020-01-07 13:21:22 +01:00
test-log.c basic/log: add a define for path relative to source root 2019-07-04 10:27:19 +02:00
test-loopback.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-mount-util.c Split out part of mount-util.c into mountpoint-util.c 2018-11-29 21:03:44 +01:00
test-mountpoint-util.c test-mountpoint-util: improve output a bit 2019-09-24 15:22:28 +02:00
test-namespace.c core: add new LogNamespace= execution setting 2020-01-31 15:01:43 +01:00
test-netlink-manual.c tree-wide: drop libkmod.h when module-util.h is included 2019-11-04 00:30:32 +09:00
test-ns.c tree-wide: fix spelling of lookup and setup verbs 2020-03-03 15:02:53 +01:00
test-nscd-flush.c shared: add helper for flushing nscd caches 2018-12-15 12:10:19 +01:00
test-nss.c tree-wide: replace if_indextoname() with format_ifname() 2019-05-29 14:21:19 +09:00
test-ordered-set.c basic/ordered-set: export networkd function to print string sets 2019-02-21 12:00:05 +01:00
test-os-util.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-parse-util.c basic/parse-util: add safe_atoux64() 2020-04-09 11:29:55 +02:00
test-path-lookup.c test: Add test for setting generator paths via environment 2020-03-04 11:25:14 +01:00
test-path-util.c meson: make user $PATH configurable 2019-11-13 22:34:14 +01:00
test-path.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-pretty-print.c codespell: fix spelling errors 2019-04-29 16:47:18 +02:00
test-prioq.c util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
test-proc-cmdline.c test-proc-cmdline: disable EFI-dependent tests when EFI is disabled 2019-11-25 08:37:09 +01:00
test-process-util.c util: uid_t, gid_t, and pid_t must be 32bit 2020-02-02 17:13:08 +01:00
test-procfs-util.c util: introduce format_bytes_full() 2019-06-19 23:15:19 +09:00
test-random-util.c random-util: allow RDRAND to be used in 32-bit x86 binaries 2018-11-10 14:56:53 +01:00
test-ratelimit.c Drop RATELIMIT macros 2019-09-20 16:05:53 +02:00
test-replace-var.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
test-rlimit-util.c tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
test-sched-prio.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-sd-hwdb.c test: initialize hwdb so that the test won't try to free memory it has never allocated 2018-11-08 13:49:45 +01:00
test-sd-path.c sd-path: handle case of missing runtime dir in test 2020-03-27 20:12:45 +01:00
test-seccomp.c make namespace_flags_to_string() not return empty string 2020-03-03 21:17:38 +01:00
test-selinux.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-serialize.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
test-set-disable-mempool.c test: add tests for $SYSTEMD_MEMPOOL= 2018-10-12 17:54:23 +09:00
test-set.c basic/ordered-set: add functions to operate on OrderedSets of strings 2019-02-21 12:00:05 +01:00
test-sigbus.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
test-signal-util.c tree-wide: drop signal.h when signal-util.h is included 2019-11-04 00:30:32 +09:00
test-siphash24.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
test-sizeof.c test-sizeof: print size socklen_t 2020-03-02 15:54:57 +01:00
test-sleep.c tree-wide: introduce strerror_safe() 2019-07-05 02:43:56 +09:00
test-socket-netlink.c util-lib: move things that parse ifnames to shared/ 2020-01-11 12:07:28 +01:00
test-socket-util.c util-lib: move things that parse ifnames to shared/ 2020-01-11 12:07:28 +01:00
test-specifier.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-stat-util.c tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
test-static-destruct.c test: add test for static destructor 2018-12-03 17:34:23 +01:00
test-strbuf.c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
test-string-util.c string-util: add helper for extracting n'th line of a string 2020-01-13 16:37:42 +01:00
test-strip-tab-ansi.c shared/logs-show: strip trailing carriage returns at EOL/EOF 2019-10-29 10:54:45 +01:00
test-strv.c Remove unneded {}s 2020-04-13 09:31:49 +02:00
test-strxcpyx.c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
test-sysctl-util.c shared/sysctl-util: normalize repeated slashes or dots to a single value 2020-01-30 10:48:27 +01:00
test-systemd-tmpfiles.py codespell: fix spelling errors 2019-04-29 16:47:18 +02:00
test-tables.c udev/link-config: rename MACPolicy to MACAddressPolicy 2019-03-22 17:16:17 +01:00
test-terminal-util.c test-terminal-util: fix typo 2020-04-08 19:45:08 +02:00
test-time-util.c tree-wide: fix how we set $TZ 2019-11-13 12:30:22 +01:00
test-tmpfiles.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
test-udev.c tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
test-uid-range.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-umask-util.c tests: add test for umask-util.h 2019-04-30 09:53:09 +02:00
test-umount.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-unaligned.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
test-unit-file.c tree-wide: drop double newline 2019-11-04 00:30:32 +09:00
test-unit-name.c basic/unit-name: make sure UnitNameFlags is signed 2019-12-19 20:57:27 +01:00
test-user-util.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
test-utf8.c shared/logs-show: strip trailing carriage returns at EOL/EOF 2019-10-29 10:54:45 +01:00
test-util.c test-util: add more tests for ALIGN_POWER2 2019-12-09 18:36:00 +01:00
test-varlink.c tests: add varlink test 2019-05-09 14:14:20 -04:00
test-verbs.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
test-watch-pid.c tests: move unit files to units/ subdirectory 2020-03-19 16:23:27 +01:00
test-watchdog.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-web-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-xattr-util.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
test-xml.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00