+ assert(rename("basic_conf/current", "basic_conf/new") == 0);
+ mesh = meshlink_open("basic_conf", "baz", "basic", DEV_CLASS_BACKBONE);
+ assert(mesh);
+ assert(!meshlink_get_node(mesh, "bar"));
+ self = meshlink_get_self(mesh);
+ assert(self);
+ assert(!strcmp(self->name, "baz"));
+ assert(access("basic_conf/new", X_OK) == -1 && errno == ENOENT);
+ meshlink_close(mesh);
+
+ // Destroy the mesh.
+
+ assert(meshlink_destroy("basic_conf"));
+
+ // Check that the configuration directory is completely empty.
+
+ DIR *dir = opendir("basic_conf");
+ assert(dir);
+ struct dirent *ent;
+
+ while((ent = readdir(dir))) {
+ assert(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."));
+ }
+
+ closedir(dir);
+
+ // Check that we can destroy it again.
+
+ assert(meshlink_destroy("basic_conf"));