tests: remove the temp container directory

c->destory() will not remove the temp container directory.
This patch fix that.

Signed-off-by: Long Wang <w@laoqinren.net>
This commit is contained in:
Long Wang 2017-07-05 15:17:58 +08:00
parent 6cd5db20bc
commit df24d43699

View File

@ -26,6 +26,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <libgen.h>
#include "confile_utils.h"
#include "lxc/state.h"
@ -985,7 +986,7 @@ int main(int argc, char *argv[])
ret = EXIT_SUCCESS;
non_test_error:
(void)unlink(tmpf);
c->destroy(c);
(void)rmdir(dirname(c->configfile));
lxc_container_put(c);
exit(ret);
}