2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

zdtm/static/autofs: stop children before c/r

A static test has to be stopped, because zdtm.py compares file descriptors
before and after c/r.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Andrei Vagin
2017-03-26 02:21:42 +03:00
committed by Pavel Emelyanov
parent f62818d9ad
commit e2c64a942c

View File

@@ -34,6 +34,7 @@ TEST_OPTION(dirname, string, "directory name", 1);
#define INDIRECT_MNT_DIR "mnt"
int autofs_dev;
task_waiter_t t;
static char *xvstrcat(char *str, const char *fmt, va_list args)
{
@@ -568,6 +569,7 @@ static int automountd(struct autofs_params *p, int control_fd)
goto err;
}
close(control_fd);
task_waiter_complete(&t, getpid());
return automountd_loop(pipes[0], autofs_path, p);
err:
@@ -599,6 +601,7 @@ static int start_automounter(struct autofs_params *p)
close(control_fd[0]);
exit(automountd(p, control_fd[1]));
}
task_waiter_wait4(&t, pid);
p->pid = pid;
close(control_fd[1]);
@@ -877,6 +880,8 @@ int main(int argc, char **argv)
test_init(argc, argv);
task_waiter_init(&t);
if (mkdir(dirname, 0777) < 0) {
pr_perror("failed to create %s directory", dirname);
return -1;