From 4bafb45b096e7246d8186f379a4663b755fb0d37 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 2 Feb 2015 13:55:25 +1300 Subject: torture-krb5: Improve the assertions in our KDC tests to be more explicit Signed-off-by: Andrew Bartlett Pair-programmed-with: Garming Sam Signed-off-by: Garming Sam --- source4/torture/krb5/kdc-canon.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source4/torture/krb5/kdc-canon.c b/source4/torture/krb5/kdc-canon.c index 8c9543c9fa..ef00e7031b 100644 --- a/source4/torture/krb5/kdc-canon.c +++ b/source4/torture/krb5/kdc-canon.c @@ -366,6 +366,17 @@ static bool torture_krb5_post_recv_tgs_req_canon_test(struct torture_krb5_contex test_context->tgs_rep.ticket.sname.name_type, test_context->tgs_req.req_body.sname->name_type, "Mismatch in name_type between request and ticket response"); + torture_assert_int_equal(test_context->tctx, + test_context->tgs_rep.ticket.sname.name_string.len, + test_context->tgs_req.req_body.sname->name_string.len, + "Mismatch in name_string.len between request and ticket response"); + torture_assert(test_context->tctx, + test_context->tgs_rep.ticket.sname.name_string.len >= 1, + "name_string.len should be >=1 in ticket response"); + torture_assert_str_equal(test_context->tctx, + test_context->tgs_rep.ticket.sname.name_string.val[0], + test_context->tgs_req.req_body.sname->name_string.val[0], + "Mismatch in name between request and expected request"); torture_assert_int_equal(test_context->tctx, *test_context->tgs_rep.ticket.enc_part.kvno & 0xFFFF0000, 0, "Unexpecedly got a RODC number in the KVNO, should just be principal KVNO"); -- cgit