]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: Fix lxc-test-saveconfig cleanup
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 24 Jan 2014 02:25:49 +0000 (21:25 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 24 Jan 2014 16:33:26 +0000 (11:33 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/tests/saveconfig.c

index a455294ef0277e9493a036e22d947330716e24c4..e87c74d97c4762525c6f415c8d83cdcd26e565f6 100644 (file)
@@ -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: