mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
Merge pull request #16542 from keszybz/make-targets-fail-again
Make targets fail again
This commit is contained in:
commit
00b868e857
|
@ -990,9 +990,10 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive, bool alr
|
|||
|
||||
j->result = result;
|
||||
|
||||
log_unit_debug(u, "Job %" PRIu32 " %s/%s finished, result=%s", j->id, u->id, job_type_to_string(t), job_result_to_string(result));
|
||||
log_unit_debug(u, "Job %" PRIu32 " %s/%s finished, result=%s",
|
||||
j->id, u->id, job_type_to_string(t), job_result_to_string(result));
|
||||
|
||||
/* If this job did nothing to respective unit we don't log the status message */
|
||||
/* If this job did nothing to the respective unit we don't log the status message */
|
||||
if (!already)
|
||||
job_emit_done_status_message(u, j->id, t, result);
|
||||
|
||||
|
|
|
@ -193,6 +193,8 @@ const UnitVTable target_vtable = {
|
|||
"Target\0"
|
||||
"Install\0",
|
||||
|
||||
.can_fail = true,
|
||||
|
||||
.load = target_load,
|
||||
.coldplug = target_coldplug,
|
||||
|
||||
|
|
|
@ -671,7 +671,8 @@ tests += [
|
|||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
'', 'timeout=120'],
|
||||
|
||||
[['src/test/test-execute.c'],
|
||||
[libcore,
|
||||
|
|
|
@ -346,10 +346,8 @@ int main(int argc, char *argv[]) {
|
|||
NULL,
|
||||
};
|
||||
|
||||
_cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL;
|
||||
_cleanup_free_ char *test_path = NULL;
|
||||
const test_function_t *test = NULL;
|
||||
Manager *m = NULL;
|
||||
_cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL;
|
||||
|
||||
umask(022);
|
||||
|
||||
|
@ -359,7 +357,8 @@ int main(int argc, char *argv[]) {
|
|||
assert_se(set_unit_path(test_path) >= 0);
|
||||
assert_se(runtime_dir = setup_fake_runtime_dir());
|
||||
|
||||
for (test = tests; test && *test; test++) {
|
||||
for (const test_function_t *test = tests; test && *test; test++) {
|
||||
Manager *m = NULL;
|
||||
int r;
|
||||
|
||||
/* We create a clean environment for each test */
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
[Unit]
|
||||
Description=Initrd File Systems
|
||||
Documentation=man:systemd.special(7)
|
||||
OnFailure=emergency.target
|
||||
OnFailureJobMode=replace-irreversibly
|
||||
ConditionPathExists=/etc/initrd-release
|
||||
After=initrd-parse-etc.service
|
||||
DefaultDependencies=no
|
||||
|
|
|
@ -11,5 +11,7 @@
|
|||
Description=Initrd Root Device
|
||||
Documentation=man:systemd.special(7)
|
||||
ConditionPathExists=/etc/initrd-release
|
||||
OnFailure=emergency.target
|
||||
OnFailureJobMode=replace-irreversibly
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
|
|
|
@ -11,5 +11,7 @@
|
|||
Description=Initrd Root File System
|
||||
Documentation=man:systemd.special(7)
|
||||
ConditionPathExists=/etc/initrd-release
|
||||
OnFailure=emergency.target
|
||||
OnFailureJobMode=replace-irreversibly
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
[Unit]
|
||||
Description=Initrd Default Target
|
||||
Documentation=man:systemd.special(7)
|
||||
OnFailure=emergency.target
|
||||
OnFailureJobMode=replace-irreversibly
|
||||
ConditionPathExists=/etc/initrd-release
|
||||
Requires=basic.target
|
||||
Wants=initrd-root-fs.target initrd-root-device.target initrd-fs.target initrd-parse-etc.service
|
||||
|
|
|
@ -13,3 +13,5 @@ Documentation=man:systemd.special(7)
|
|||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
After=local-fs-pre.target
|
||||
OnFailure=emergency.target
|
||||
OnFailureJobMode=replace-irreversibly
|
||||
|
|
Loading…
Reference in a new issue