s4:torture: Improve error message in whoami test
authorAndreas Schneider <asn@samba.org>
Fri, 12 Jan 2018 12:45:33 +0000 (13:45 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Sun, 14 Jan 2018 21:09:24 +0000 (22:09 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Sun Jan 14 22:09:24 CET 2018 on sn-devel-144

source4/torture/unix/whoami.c

index bb70e4781ae255548546e2631eb6975542187f88..efd9efaab572661dc478c3d3d5a0bbbaa1c10221 100644 (file)
@@ -91,8 +91,13 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx,
                                        lpcfg_gensec_settings(tctx, tctx->lp_ctx));
 
        if (!NT_STATUS_IS_OK(status)) {
-               printf("failed to connect to //%s/%s: %s\n",
-                       host, share, nt_errstr(status));
+               torture_comment(tctx,
+                               "FATAL: Failed to connect to //%s/%s "
+                               "with %s - %s\n",
+                               host,
+                               share,
+                               cli_credentials_get_username(creds),
+                               nt_errstr(status));
                return NULL;
        }