Apache HTTPD
Classes | Macros | Functions | Variables
testredis.c File Reference
#include "testutil.h"
#include "apr.h"
#include "apu.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "apr_hash.h"
#include "apr_redis.h"
#include "apr_network_io.h"
#include <stdio.h>

Go to the source code of this file.

Classes

struct  my_hash_server_baton
 

Macros

#define HOST   "localhost"
 
#define PORT   6379
 
#define TDATA_SIZE   3000
 
#define TDATA_SET   100
 
#define HASH_FUNC_RESULT   510
 

Functions

static apr_uint32_t my_hash_func (void *baton, const char *data, apr_size_t data_len)
 
static apr_redis_server_tmy_server_func (void *baton, apr_redis_t *mc, const apr_uint32_t hash)
 
static int randval (apr_uint32_t high)
 
static void test_redis_create (abts_case *tc, void *data)
 
static int create_test_hash (apr_pool_t *p, apr_hash_t *h)
 
static void test_redis_user_funcs (abts_case *tc, void *data)
 
static void test_redis_meta (abts_case *tc, void *data)
 
static void test_redis_incrdecr (abts_case *tc, void *data)
 
static void test_redis_setget (abts_case *tc, void *data)
 
static void test_redis_setexget (abts_case *tc, void *data)
 
static apr_status_t check_redis (void)
 
abts_suitetestredis (abts_suite *suite)
 

Variables

static const char prefix [] = "testredis"
 
static const char txt []
 
static apr_uint16_t firsttime = 0
 

Macro Definition Documentation

◆ HASH_FUNC_RESULT

#define HASH_FUNC_RESULT   510

Definition at line 41 of file testredis.c.

◆ HOST

#define HOST   "localhost"

Definition at line 31 of file testredis.c.

◆ PORT

#define PORT   6379

Definition at line 32 of file testredis.c.

◆ TDATA_SET

#define TDATA_SET   100

Definition at line 38 of file testredis.c.

◆ TDATA_SIZE

#define TDATA_SIZE   3000

Definition at line 35 of file testredis.c.

Function Documentation

◆ check_redis()

static apr_status_t check_redis ( void  )
static

Definition at line 468 of file testredis.c.

◆ create_test_hash()

static int create_test_hash ( apr_pool_t p,
apr_hash_t h 
)
static

Definition at line 181 of file testredis.c.

◆ my_hash_func()

static apr_uint32_t my_hash_func ( void *  baton,
const char data,
apr_size_t  data_len 
)
static

Definition at line 76 of file testredis.c.

◆ my_server_func()

static apr_redis_server_t * my_server_func ( void *  baton,
apr_redis_t mc,
const apr_uint32_t  hash 
)
static

Definition at line 89 of file testredis.c.

◆ randval()

static int randval ( apr_uint32_t  high)
static

Definition at line 110 of file testredis.c.

◆ test_redis_create()

static void test_redis_create ( abts_case tc,
void *  data 
)
static

Definition at line 131 of file testredis.c.

◆ test_redis_incrdecr()

static void test_redis_incrdecr ( abts_case tc,
void *  data 
)
static

Definition at line 298 of file testredis.c.

◆ test_redis_meta()

static void test_redis_meta ( abts_case tc,
void *  data 
)
static

Definition at line 244 of file testredis.c.

◆ test_redis_setexget()

static void test_redis_setexget ( abts_case tc,
void *  data 
)
static

Definition at line 409 of file testredis.c.

◆ test_redis_setget()

static void test_redis_setget ( abts_case tc,
void *  data 
)
static

Definition at line 353 of file testredis.c.

◆ test_redis_user_funcs()

static void test_redis_user_funcs ( abts_case tc,
void *  data 
)
static

Definition at line 197 of file testredis.c.

◆ testredis()

abts_suite * testredis ( abts_suite suite)

Definition at line 528 of file testredis.c.

Variable Documentation

◆ firsttime

apr_uint16_t firsttime = 0
static

Definition at line 109 of file testredis.c.

◆ prefix

const char prefix[] = "testredis"
static

Definition at line 44 of file testredis.c.

◆ txt

const char txt[]
static
Initial value:
=
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis at"
"lacus in ligula hendrerit consectetuer. Vestibulum tristique odio"
"iaculis leo. In massa arcu, ultricies a, laoreet nec, hendrerit non,"
"neque. Nulla sagittis sapien ac risus. Morbi ligula dolor, vestibulum"
"nec, viverra id, placerat dapibus, arcu. Curabitur egestas feugiat"
"tellus. Donec dignissim. Nunc ante. Curabitur id lorem. In mollis"
"tortor sit amet eros auctor dapibus. Proin nulla sem, tristique in,"
"convallis id, iaculis feugiat cras amet."

Definition at line 47 of file testredis.c.