mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
test, sysext: Actually fail the whole operation if sd-merge worker failed
This also fixes a wrong merge failure check.
This commit is contained in:
@@ -1742,9 +1742,10 @@ static int merge(ImageClass image_class,
|
||||
r = wait_for_terminate_and_check("(sd-merge)", pid, WAIT_LOG_ABNORMAL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (r == 123) /* exit code 123 means: didn't do anything */
|
||||
return 0;
|
||||
if (r > 0)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(ENXIO), "Failed to merge hierarchies");
|
||||
|
||||
r = need_reload(image_class, hierarchies, no_reload);
|
||||
if (r < 0)
|
||||
|
||||
@@ -1323,7 +1323,7 @@ ln -sfTr "${real_ext_dir}" "${ext_data_path}"
|
||||
prep_ro_hierarchy "${fake_root}" "${hierarchy}"
|
||||
|
||||
# run systemd-sysext
|
||||
SYSTEMD_SYSEXT_HIERARCHIES="${hierarchy}" systemd-sysext --root="${fake_root}" --mutable=auto merge || die "expected merge to fail"
|
||||
SYSTEMD_SYSEXT_HIERARCHIES="${hierarchy}" systemd-sysext --root="${fake_root}" --mutable=auto merge && die "expected merge to fail"
|
||||
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user