In a number of virt-host-validte tests we are testing for
at least one out of multiple acceptable features. For
example the 'secure guest' test can be satisfied by
s390x protvirt, or x86 TDX, SEV, SEV-ES, SEV-SNP.
It would be useful to inform the user which one we detected
when the test passes. This introduces virValidatePassDetails
to enable that.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
}
void virValidatePass(void)
+{
+ virValidatePassDetails(NULL);
+}
+
+void virValidatePassDetails(const char *info)
{
if (quiet)
return;
if (virValidateWantEscape())
- fprintf(stdout, "\033[32m%s\033[0m\n", _("PASS"));
+ fprintf(stdout, "\033[32m%s\033[0m", _("PASS"));
else
fprintf(stdout, "%s\n", _("PASS"));
+
+ if (info)
+ fprintf(stdout, " (%s)\n", info);
+ else
+ fprintf(stdout, "\n");
}
...) G_GNUC_PRINTF(2, 3);
void virValidatePass(void);
+void virValidatePassDetails(const char *info);
void virValidateFail(virValidateLevel level,
const char *format,
...) G_GNUC_PRINTF(2, 3);