xref: /qemu/include/system/qtest.h (revision 0bd9aef89ba941b41773d9dbfa94433c2b7d00de)
1c7f0f3b1SAnthony Liguori /*
2c7f0f3b1SAnthony Liguori  * Test Server
3c7f0f3b1SAnthony Liguori  *
4c7f0f3b1SAnthony Liguori  * Copyright IBM, Corp. 2011
5c7f0f3b1SAnthony Liguori  *
6c7f0f3b1SAnthony Liguori  * Authors:
7c7f0f3b1SAnthony Liguori  *  Anthony Liguori   <aliguori@us.ibm.com>
8c7f0f3b1SAnthony Liguori  *
9c7f0f3b1SAnthony Liguori  * This work is licensed under the terms of the GNU GPL, version 2 or later.
10c7f0f3b1SAnthony Liguori  * See the COPYING file in the top-level directory.
11c7f0f3b1SAnthony Liguori  *
12c7f0f3b1SAnthony Liguori  */
13c7f0f3b1SAnthony Liguori 
14c7f0f3b1SAnthony Liguori #ifndef QTEST_H
15c7f0f3b1SAnthony Liguori #define QTEST_H
16c7f0f3b1SAnthony Liguori 
17c7f0f3b1SAnthony Liguori 
18d5286af5Sliguang extern bool qtest_allowed;
19c7f0f3b1SAnthony Liguori 
20c7f0f3b1SAnthony Liguori static inline bool qtest_enabled(void)
21c7f0f3b1SAnthony Liguori {
22c7f0f3b1SAnthony Liguori     return qtest_allowed;
23c7f0f3b1SAnthony Liguori }
24c7f0f3b1SAnthony Liguori 
25b3be57c3SMichael S. Tsirkin bool qtest_driver(void);
26b3be57c3SMichael S. Tsirkin 
272b8985f1SOleinik, Alexander void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error **errp);
28d4fce24fSPaolo Bonzini 
29e731d083SAlexander Bulekov void qtest_server_set_send_handler(void (*send)(void *, const char *),
30e731d083SAlexander Bulekov                                  void *opaque);
31*0bd9aef8SAlexander Bulekov void qtest_server_inproc_recv(void *opaque, const char *buf);
32e731d083SAlexander Bulekov 
33c7f0f3b1SAnthony Liguori #endif
34