Navigation


Changeset 29:5ba91682f0bc in freeDiameter for freeDiameter/tests/tests.h


Ignore:
Timestamp:
Oct 28, 2009, 3:19:50 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added a test for cnxctx (tbc) and fixed some bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/tests/tests.h

    r10 r29  
    4646#include <pthread.h>
    4747#include <errno.h>
     48#include <gcrypt.h>
    4849
    4950/* Test timeout duration, unless -n is passed on the command line */
    5051#ifndef TEST_TIMEOUT
    51 #define TEST_TIMEOUT    5       /* 5 seconds */
     52#define TEST_TIMEOUT    30      /* in seconds */
    5253#endif /* TEST_TIMEOUT */
    5354
     
    7879struct fd_config * fd_g_config = &conf;
    7980
     81/* gcrypt functions to support posix threads */
     82GCRY_THREAD_OPTION_PTHREAD_IMPL;
     83
    8084/* Define the standard check routines */
    8185#define CHECK( _val, _assert ){                         \
     
    99103
    100104/* Minimum inits */
    101 #define INIT_FD() {                                             \
    102         memset(fd_g_config, 0, sizeof(struct fd_config));       \
    103         CHECK( 0, fd_lib_init() );                              \
    104         fd_log_threadname(basename(__FILE__));                  \
    105         CHECK( 0, fd_conf_init() );                             \
    106         CHECK( 0, fd_dict_base_protocol(fd_g_config->cnf_dict) );       \
    107         parse_cmdline(argc, argv);                              \
     105#define INIT_FD() {                                                             \
     106        memset(fd_g_config, 0, sizeof(struct fd_config));                       \
     107        CHECK( 0, fd_lib_init() );                                              \
     108        fd_log_threadname(basename(__FILE__));                                  \
     109        (void) gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);    \
     110        (void) gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);                   \
     111        CHECK( 0, gnutls_global_init());                                        \
     112        CHECK( 0, fd_conf_init() );                                             \
     113        CHECK( 0, fd_dict_base_protocol(fd_g_config->cnf_dict) );               \
     114        parse_cmdline(argc, argv);                                              \
    108115}
    109116
Note: See TracChangeset for help on using the changeset viewer.