tests: improve error message when saving TLS PSK file fails
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 10 Mar 2022 17:18:05 +0000 (17:18 +0000)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 21 Apr 2022 18:36:46 +0000 (19:36 +0100)
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-3-berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tests/unit/crypto-tls-psk-helpers.c

index 7f8a4889610cfb664fea38805ecbe8b76fc6c872..4bea7c6fa28d63dc95a80a2390e114a0234d6183 100644 (file)
@@ -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. */