-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlibmemctest.h
60 lines (43 loc) · 1.33 KB
/
libmemctest.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef LIBMEMCTEST_H
#define LIBMEMCTEST_H
#ifdef __cplusplus
extern "C" {
#endif
#include "libmemc.h"
static int test_counter = 0;
static int test_success_counter = 0;
static int verbose = 0;
static int binary_protocol = 0;
static int textual_protocol = 0;
static char *memcached_path = "..";
struct memcached_process_handle {
int pid;
int port;
int udpport;
int socket;
struct memcached_process_handle *next;
};
struct memcached_process_handle* process_handle;
void test_init(int argc, char **argv);
int ok_test(int ok_result, const char* ok_str, const char* not_ok_str);
int test_report();
int mem_get_is(struct Memcache* mc, const struct Item *item,
const char* msg_ok, const char* msg_not_ok);
int mem_gets_is(struct Memcache* mc, const struct Item *item,
const char* msg_ok, const char* msg_not_ok);
struct memcached_process_handle *new_memcached(int port, char* args);
int new_sock(struct memcached_process_handle *handle);
int new_udp_sock(struct memcached_process_handle *handle);
void exit_cleanup(void);
void setItem(struct Item *item,
uint64_t cas_id,
const char *key,
int keylen,
uint32_t flags,
void *data,
size_t size,
size_t exptime);
#ifdef __cplusplus
}
#endif
#endif /* LIBMEMCTEST_H */