Latest leases patchset - getting there !

Stefan (metze) Metzmacher metze at samba.org
Mon Nov 17 19:18:28 MST 2014


Am 17.11.2014 um 23:42 schrieb Jeremy Allison:
> On Mon, Nov 17, 2014 at 08:21:50PM +0100, Stefan (metze) Metzmacher wrote:
>> Am 17.11.2014 um 20:16 schrieb Jeremy Allison:
>>> On Mon, Nov 17, 2014 at 08:02:38PM +0100, Stefan (metze) Metzmacher wrote:
>>>>> Great ! I'll write the test for the dynamic share
>>>>> path today, and then I think we have full coverage
>>>>> (fingers crossed :-).
>>>>
>>>> :-)
>>>>
>>>> Can you also change the timeout test in order to verify that
>>>> we still be a async break to none, when the other handle writes.
>>>> As an additional verification that the lease is not damaged,
>>>> but letting it timing out.
>>>
>>> Sure, let me finish my dynamic share path test first :-).
>>
>> Sure, thanks!
> 
> Done !
> 
> Here is the patch for dynamic shares tests. In writing it
> I found an error in the open logic when creating files
> (I incorrectly allowed leases on new files which have
> existing lease_db entries, where I should have broken
> the lease), so the patchset contains the fix for that
> as well as the test. Attached are all the current
> leases patchsets that go on top of master, in order
> (to allow others to follow along).
> 
> The dynamic shares tests patch is lp6. I'll take a look
> at the other tests you wanted fixing now.

Thanks! Can you add a check that we can't upgrade over 2_10
instead of verifying this only for 3_00?

> +	/* Close everything.. */
> +	smb2_util_close(tree_2_1, h);
> +	smb2_util_close(tree_3_0, h1);

Here we should add something like this:

	/* Try to upgrade to RWH over connection 3_0 */
	ls1.lease_state = smb2_util_lease_state("RWH");
	status = smb2_create(tree_3_0, mem_ctx, &io);
	CHECK_STATUS(status, NT_STATUS_OK);
	h1 = io.out.file.handle;
	CHECK_CREATED(&io, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
	/* Should have been denied. */
	CHECK_LEASE(&io, "", true, LEASE1, 0);  <-- what do we get here?
        smb2_util_close(tree_3_0, h1);

> +	smb2_util_close(tree_3_0, h2);


Thanks!

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


More information about the samba-technical mailing list