From: Daniel P. Berrangé Date: Thu, 10 Mar 2022 17:18:05 +0000 (+0000) Subject: tests: improve error message when saving TLS PSK file fails X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a17ec44dba741de97e63efcda28852e73fca06dc;p=qemu.git tests: improve error message when saving TLS PSK file fails Reviewed-by: Peter Xu Signed-off-by: Daniel P. Berrangé Message-Id: <20220310171821.3724080-3-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- diff --git a/tests/unit/crypto-tls-psk-helpers.c b/tests/unit/crypto-tls-psk-helpers.c index 7f8a488961..4bea7c6fa2 100644 --- a/tests/unit/crypto-tls-psk-helpers.c +++ b/tests/unit/crypto-tls-psk-helpers.c @@ -30,7 +30,7 @@ void test_tls_psk_init(const char *pskfile) fp = fopen(pskfile, "w"); if (fp == NULL) { - g_critical("Failed to create pskfile %s", pskfile); + g_critical("Failed to create pskfile %s: %s", pskfile, strerror(errno)); abort(); } /* Don't do this in real applications! Use psktool. */