verify: ignore nonexistent executables if required
authorGiedrius Statkevičius <giedriuswork@gmail.com>
Tue, 7 Apr 2020 21:38:16 +0000 (00:38 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 14 Apr 2020 19:23:31 +0000 (21:23 +0200)
commitc90c597ee3b6b9d30ee86410e46939ba875e467a
treee56864066fee04624e7258e8be571e7c34234992
parent5fa5c3e2d04622be74d0b7aa199ecdc8a02622fe
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.
src/analyze/analyze-verify.c
src/analyze/analyze-verify.h
src/analyze/test-verify.c [new file with mode: 0644]
src/test/meson.build