[PATCHES] more clusapi testing

Jeremy Allison jra at samba.org
Fri Aug 5 00:01:21 UTC 2016


On Wed, Jul 27, 2016 at 05:20:36PM +0200, Günther Deschner wrote:
> Hi,
> 
> attached some more patches for the cluster management protocol testing.
> 
> Please review & push,

Mostly looks good - just a few immediate comments :

In [PATCH 04/13] s4-torture: add new tests for clusapi resourcetypes.

+       if (W_ERROR_EQUAL(r.out.result, WERR_MORE_DATA)) {
+               r.out.lpOutBuffer = talloc_zero_array(tctx, uint8_t, *r.out.lpcbRequired);
+               r.in.nOutBufferSize = *r.out.lpcbRequired;
+               torture_assert_ntstatus_ok(tctx,
+                       dcerpc_clusapi_ResourceTypeControl_r(b, tctx, &r),
+                       "ResourceTypeControl failed");
+       }

+       r.in.nOutBufferSize = 0x400;
+       r.out.lpOutBuffer = talloc_zero_array(tctx, uint8_t, r.in.nOutBufferSize);
+
+       torture_assert_ntstatus_ok(tctx,
+               dcerpc_clusapi_ResourceTypeControl_r(b, tctx, &r),
+               "ResourceTypeControl failed");

Shouldn't you be checking for NULL after the talloc's here,
or are you just expecting the dcerpc_clusapi_ResourceTypeControl_r()
calls to catch it ?

Jeremy.



More information about the samba-technical mailing list