Commit df24d436 by Long Wang

tests: remove the temp container directory

c->destory() will not remove the temp container directory. This patch fix that. Signed-off-by: 's avatarLong Wang <w@laoqinren.net>
parent 6cd5db20
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
#include <libgen.h>
#include "confile_utils.h" #include "confile_utils.h"
#include "lxc/state.h" #include "lxc/state.h"
...@@ -985,7 +986,7 @@ int main(int argc, char *argv[]) ...@@ -985,7 +986,7 @@ int main(int argc, char *argv[])
ret = EXIT_SUCCESS; ret = EXIT_SUCCESS;
non_test_error: non_test_error:
(void)unlink(tmpf); (void)unlink(tmpf);
c->destroy(c); (void)rmdir(dirname(c->configfile));
lxc_container_put(c); lxc_container_put(c);
exit(ret); exit(ret);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment