Want to add some extra info to smbtorture tests

Stefan (metze) Metzmacher metze at samba.org
Tue Feb 19 23:30:58 MST 2013


Am 19.02.2013 21:13, schrieb Richard Sharpe:
> Hi folks,
> 
> QA departments use smbtorture, and when tests fail I have to go to no
> end of trouble to figure out what version of smbtorture they are
> running and what they were actually testing against.
> 
> Now, it turns out that that info is available in the SessionSetup
> response, so I would like to add something like this to smbtorture:
> 
> diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
> index 343c8a7..1ed6168 100644
> --- a/source4/torture/util_smb.c
> +++ b/source4/torture/util_smb.c
> @@ -814,6 +814,9 @@ static bool wrap_simple_1smb_test(struct torture_context *to
> 
>         torture_assert_goto(torture_ctx, torture_open_connection(&cli1, torture_
> 
> +       printf("Remote OS: %s, Lan Manager: %s\n",
> +               cli1->session->os, cli1->session->lanman);
> +
>         fn = test->fn;
> 
>         ret = fn(torture_ctx, cli1);
> 
> Now, this is not the correct place, because it only gets one test, but
> it is the earliest that we have that info. We get the following in the
> log:
> 
> test: sumtab
> time: 2013-02-19 12:08:32.612917
> Remote OS: Unix, Lan Manager: Samba 3.6.12
> time: 2013-02-19 12:08:32.826263
> success: sumtab
> 
> Of course, I will have to extend the smb2 session setup code in
> libcli/smb to capture this info as well, but it seems worth it. It
> might also be worth listing the version of the protocol being used.

SMB2/3 doesn't offer this information, we can only display the
negotiated dialect.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130220/7823eebf/attachment.pgp>


More information about the samba-technical mailing list