]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4-torture: fix asserts in clusapi_NodeControl tests
authorGünther Deschner <gd@samba.org>
Mon, 13 Jan 2020 17:30:14 +0000 (18:30 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 16 Jan 2020 20:09:42 +0000 (20:09 +0000)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/rpc/clusapi.c

index 46950aff4e12053b6f91f05724412d71051adfa8..995a8bdd4385cbc4d7b6e4b2dd943e3d8d4cf2ac 100644 (file)
@@ -1660,8 +1660,8 @@ static bool test_NodeControl_int(struct torture_context *tctx,
                const char *str;
                DATA_BLOB blob = data_blob_const(r.out.lpOutBuffer, *r.out.lpBytesReturned);
 
-               torture_assert(tctx, *r.out.lpBytesReturned < 4, "unexpected size");
-               torture_assert(tctx, *r.out.lpBytesReturned % 2, "must be a multiple of 2");
+               torture_assert(tctx, *r.out.lpBytesReturned >= 4, "must be at least 4 bytes long");
+               torture_assert(tctx, (*r.out.lpBytesReturned % 2) == 0, "must be a multiple of 2");
 
                torture_assert(tctx,
                        pull_reg_sz(tctx, &blob, &str),