[lxc-devel] [PATCH] tests: Fix lxc-test-saveconfig cleanup

Stéphane Graber stgraber at ubuntu.com
Fri Jan 24 03:01:34 UTC 2014


Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/tests/saveconfig.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/tests/saveconfig.c b/src/tests/saveconfig.c
index a455294..e87c74d 100644
--- a/src/tests/saveconfig.c
+++ b/src/tests/saveconfig.c
@@ -98,6 +98,16 @@ int main(int argc, char *argv[])
 		goto out;
 	}
 
+	if (!c->destroy(c)) {
+		fprintf(stderr, "%d: error deleting %s\n", __LINE__, MYNAME);
+		goto out;
+	}
+
+	if (c->is_defined(c)) {
+		fprintf(stderr, "%d: %s thought it was defined\n", __LINE__, MYNAME);
+		goto out;
+	}
+
 	fprintf(stderr, "all lxc_container tests passed for %s\n", c->name);
 	ret = 0;
 out:
-- 
1.8.5.3



More information about the lxc-devel mailing list