Files
xen/tools/libxl/test_common.h
T
Ian Jackson 75420396df libxl: event tests: Provide miniature poll machinery
This allows a test case to have a poll-based event loop with exact
control of the sequence of operations.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2015-07-15 11:40:43 +01:00

30 lines
535 B
C

#ifndef TEST_COMMON_H
#define TEST_COMMON_H
#include "libxl.h"
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
void test_common_setup(int level);
extern libxl_ctx *ctx;
void test_common_get_now(void);
extern struct timeval now;
void test_common_beforepoll(void);
void test_common_dopoll(void);
void test_common_afterpoll(void);
extern int poll_nfds, poll_nfds_allocd;
extern struct pollfd *poll_fds;
extern int poll_timeout;
#endif /*TEST_COMMON_H*/