~nova-coresec/ubuntu/maverick/libvirt/nova-ppa

« back to all changes in this revision

Viewing changes to tests/qemuargv2xmltest.c

  • Committer: Bazaar Package Importer
  • Author(s): Guido Günther
  • Date: 2010-04-19 18:11:57 UTC
  • mto: (3.4.14 squeeze) (1.2.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 92.
  • Revision ID: james.westby@ubuntu.com-20100419181157-yyj82wyh90r6wxwr
Tags: upstream-0.8.0
Import upstream version 0.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
#ifdef WITH_QEMU
12
12
 
13
 
#include "internal.h"
14
 
#include "testutils.h"
15
 
#include "qemu/qemu_conf.h"
 
13
# include "internal.h"
 
14
# include "testutils.h"
 
15
# include "qemu/qemu_conf.h"
16
16
 
17
 
#include "testutilsqemu.h"
 
17
# include "testutilsqemu.h"
18
18
 
19
19
static char *progname;
20
20
static char *abs_srcdir;
21
21
static struct qemud_driver driver;
22
22
 
23
 
#define MAX_FILE 4096
 
23
# define MAX_FILE 4096
24
24
 
25
25
static int blankProblemElements(char *data)
26
26
{
114
114
    if((driver.stateDir = strdup("/nowhere")) == NULL)
115
115
        return EXIT_FAILURE;
116
116
 
117
 
#define DO_TEST_FULL(name, extraFlags, migrateFrom)                     \
 
117
# define DO_TEST_FULL(name, extraFlags, migrateFrom)                     \
118
118
    do {                                                                \
119
119
        const struct testInfo info = { name, extraFlags, migrateFrom }; \
120
120
        if (virtTestRun("QEMU ARGV-2-XML " name,                        \
122
122
            ret = -1;                                                   \
123
123
    } while (0)
124
124
 
125
 
#define DO_TEST(name, extraFlags)                       \
 
125
# define DO_TEST(name, extraFlags)                       \
126
126
        DO_TEST_FULL(name, extraFlags, NULL)
127
127
 
128
128
    setenv("PATH", "/bin", 1);
162
162
    /*DO_TEST("disk-drive-cache-v1-wt", QEMUD_CMD_FLAG_DRIVE);*/
163
163
    DO_TEST("disk-drive-cache-v1-wb", QEMUD_CMD_FLAG_DRIVE);
164
164
    DO_TEST("disk-drive-cache-v1-none", QEMUD_CMD_FLAG_DRIVE);
 
165
    DO_TEST("disk-drive-error-policy-stop", QEMUD_CMD_FLAG_DRIVE |
 
166
            QEMUD_CMD_FLAG_MONITOR_JSON |
 
167
            QEMUD_CMD_FLAG_DRIVE_FORMAT);
 
168
    DO_TEST("disk-drive-error-policy-enospace", QEMUD_CMD_FLAG_DRIVE |
 
169
            QEMUD_CMD_FLAG_MONITOR_JSON |
 
170
            QEMUD_CMD_FLAG_DRIVE_FORMAT);
165
171
    DO_TEST("disk-drive-cache-v2-wt", QEMUD_CMD_FLAG_DRIVE |
166
172
            QEMUD_CMD_FLAG_DRIVE_CACHE_V2);
167
173
    DO_TEST("disk-drive-cache-v2-wb", QEMUD_CMD_FLAG_DRIVE |