qtest.h 650 字节
Newer Older
A
Anthony Liguori 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Test Server
 *
 * Copyright IBM, Corp. 2011
 *
 * Authors:
 *  Anthony Liguori   <aliguori@us.ibm.com>
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 *
 */

#ifndef QTEST_H
#define QTEST_H

#include "qemu-common.h"
18
#include "qapi/error.h"
A
Anthony Liguori 已提交
19

20
extern bool qtest_allowed;
A
Anthony Liguori 已提交
21 22 23 24 25 26

static inline bool qtest_enabled(void)
{
    return qtest_allowed;
}

27 28
bool qtest_driver(void);

29
void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp);
30

A
Anthony Liguori 已提交
31 32
static inline int qtest_available(void)
{
33
#ifdef CONFIG_POSIX
A
Anthony Liguori 已提交
34
    return 1;
35 36 37
#else
    return 0;
#endif
38
}
A
Anthony Liguori 已提交
39 40

#endif