]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
snapshot test: make sure that external snapshot was really created
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 2 Jun 2014 13:53:16 +0000 (08:53 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 18 Jun 2014 21:35:15 +0000 (17:35 -0400)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/tests/snapshot.c

index 21acd3e72f4a0b669b956201152c27e36e75cc27..b035096f1b4600df4bc8c218acb1223033b74db6 100644 (file)
@@ -126,6 +126,12 @@ int main(int argc, char *argv[])
                goto err;
        }
 
+       c2 = lxc_container_new(RESTNAME, NULL);
+       if (!c2 || !c2->is_defined(c2)) {
+               fprintf(stderr, "%s: %d: external snapshot restore failed\n", __FILE__, __LINE__);
+               goto err;
+       }
+       lxc_container_put(c2);
 
        c2 = c->clone(c, MYNAME2, NULL, LXC_CLONE_SNAPSHOT, "overlayfs", NULL, 0, NULL);
        if (!c2) {