mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: cache the result of whether logind is available
Similar to how we cache the availability of machined. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -751,12 +751,15 @@ mymain(void)
|
||||
}; \
|
||||
if (virTestRun("Test " name " ", testPMSupportHelper, &data) < 0) \
|
||||
ret = -1; \
|
||||
virSystemdHasLogindResetCachedValue(); \
|
||||
if (virTestRun("Test " name " no systemd ", \
|
||||
testPMSupportHelperNoSystemd, &data) < 0) \
|
||||
ret = -1; \
|
||||
virSystemdHasLogindResetCachedValue(); \
|
||||
if (virTestRun("Test systemd " name " not running ", \
|
||||
testPMSupportSystemdNotRunning, &data) < 0) \
|
||||
ret = -1; \
|
||||
virSystemdHasLogindResetCachedValue(); \
|
||||
} while (0)
|
||||
|
||||
TESTS_PM_SUPPORT_HELPER("canSuspend", &virSystemdCanSuspend);
|
||||
|
||||
Reference in New Issue
Block a user