From: Ian Jackson Date: Tue, 23 Jun 2015 17:42:59 +0000 (+0100) Subject: test_domain_create_new: Avoid calling destroy on dom0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=11cb215aca7beaad137081192406cd31909c65da;p=people%2Fiwj%2Fring3-xl-test.git test_domain_create_new: Avoid calling destroy on dom0 Initialise domid to -2. Assert that it is nonzero when we are going to destroy. We might still try to destroy -2 or -1, but that's harmless. Signed-off-by: Ian Jackson --- diff --git a/test_domain_create_new.c b/test_domain_create_new.c index 3481c6e..f6f12f8 100644 --- a/test_domain_create_new.c +++ b/test_domain_create_new.c @@ -43,6 +43,7 @@ void *testcase(struct test *tc) printf("\n****** Will cancel after %d events ******\n", count); + domid = -2; do_domain_create(tc, &dc, &domid); if (wait_until_n(tc, EV_LIBXL_CALLBACK, count, &ev)) { @@ -58,6 +59,7 @@ void *testcase(struct test *tc) printf("libxl_ao_cancel returned %d\n", rc); assert(rc == ERROR_NOTFOUND); + assert(domid); libxl_domain_destroy(tc->ctx, domid, 0); break; }