Line data Source code
1 : /* try login and logout multiple times in a row */
2 :
3 : #include <config.h>
4 :
5 : #include <stdio.h>
6 : #include <ctpublic.h>
7 : #include "common.h"
8 :
9 : int
10 8 : main(void)
11 : {
12 : CS_CONTEXT *ctx;
13 : CS_CONNECTION *conn;
14 : CS_COMMAND *cmd;
15 8 : int verbose = 0;
16 : int i;
17 :
18 8 : printf("%s: Testing login, logout\n", __FILE__);
19 :
20 808 : for (i =0; i < 100; ++i) {
21 :
22 : if (verbose)
23 : printf("Trying login\n");
24 :
25 800 : check_call(try_ctlogin, (&ctx, &conn, &cmd, verbose));
26 :
27 : if (verbose)
28 : printf("Trying logout\n");
29 :
30 800 : check_call(try_ctlogout, (ctx, conn, cmd, verbose));
31 : }
32 :
33 : if (verbose)
34 : printf("Test succeeded\n");
35 :
36 : return 0;
37 : }
|