util: drop unix_nonblocking_connect()
[qemu/cris-port.git] / tests / libqos / libqos.h
blob604980d1250430c687a268077d8bfe59562581bc
1 #ifndef LIBQOS_H
2 #define LIBQOS_H
4 #include "libqtest.h"
5 #include "libqos/pci.h"
6 #include "libqos/malloc-pc.h"
8 typedef struct QOSOps {
9 QGuestAllocator *(*init_allocator)(QAllocOpts);
10 void (*uninit_allocator)(QGuestAllocator *);
11 } QOSOps;
13 typedef struct QOSState {
14 QTestState *qts;
15 QGuestAllocator *alloc;
16 QOSOps *ops;
17 } QOSState;
19 QOSState *qtest_vboot(QOSOps *ops, const char *cmdline_fmt, va_list ap);
20 QOSState *qtest_boot(QOSOps *ops, const char *cmdline_fmt, ...);
21 void qtest_shutdown(QOSState *qs);
22 bool have_qemu_img(void);
23 void mkimg(const char *file, const char *fmt, unsigned size_mb);
24 void mkqcow2(const char *file, unsigned size_mb);
25 void set_context(QOSState *s);
26 void migrate(QOSState *from, QOSState *to, const char *uri);
27 void prepare_blkdebug_script(const char *debug_fn, const char *event);
28 void generate_pattern(void *buffer, size_t len, size_t cycle_len);
30 static inline uint64_t qmalloc(QOSState *q, size_t bytes)
32 return guest_alloc(q->alloc, bytes);
35 static inline void qfree(QOSState *q, uint64_t addr)
37 guest_free(q->alloc, addr);
40 #endif