~ubuntu-branches/ubuntu/precise/krb5/precise-updates

« back to all changes in this revision

Viewing changes to src/tests/threads/init_ctx.c

  • Committer: Package Import Robot
  • Author(s): Sam Hartman
  • Date: 2011-12-01 19:34:41 UTC
  • mfrom: (28.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20111201193441-9tipg3aru1jsidyv
Tags: 1.10+dfsg~alpha1-6
* Fix segfault with unknown hostnames in krb5_sname_to_principal,
  Closes: #650671
* Indicate that this library breaks libsmbclient versions that depend on
  krb5_locate_kdc, Closes: #650603, #650611

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 
2
/* tests/threads/init_ctx.c */
2
3
/*
3
 
 * test/threads/init_ctx.c
4
 
 *
5
4
 * Copyright (C) 2009 by the Massachusetts Institute of Technology.
6
5
 * All rights reserved.
7
6
 *
23
22
 * M.I.T. makes no representations about the suitability of
24
23
 * this software for any purpose.  It is provided "as is" without express
25
24
 * or implied warranty.
26
 
 *
27
 
 *
 
25
 */
 
26
 
 
27
/*
28
28
 * krb5 context creation performance testing
29
29
 * initially contributed by Ken Raeburn
30
30
 */
165
165
 
166
166
    r->start_time = now ();
167
167
    for (i = 0; i < iter_count; i++) {
168
 
        err = krb5_init_context(&ctx);
169
 
        if (err) {
170
 
            com_err(prog, err, "initializing krb5 context");
171
 
            exit(1);
172
 
        }
173
 
        krb5_free_context(ctx);
 
168
        err = krb5_init_context(&ctx);
 
169
        if (err) {
 
170
            com_err(prog, err, "initializing krb5 context");
 
171
            exit(1);
 
172
        }
 
173
        krb5_free_context(ctx);
174
174
    }
175
175
    r->end_time = now ();
176
176
}