mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-04 16:25:31 +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:
committed by
Pavel Emelyanov
parent
f62818d9ad
commit
e2c64a942c
@@ -34,6 +34,7 @@ TEST_OPTION(dirname, string, "directory name", 1);
|
|||||||
#define INDIRECT_MNT_DIR "mnt"
|
#define INDIRECT_MNT_DIR "mnt"
|
||||||
|
|
||||||
int autofs_dev;
|
int autofs_dev;
|
||||||
|
task_waiter_t t;
|
||||||
|
|
||||||
static char *xvstrcat(char *str, const char *fmt, va_list args)
|
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;
|
goto err;
|
||||||
}
|
}
|
||||||
close(control_fd);
|
close(control_fd);
|
||||||
|
task_waiter_complete(&t, getpid());
|
||||||
return automountd_loop(pipes[0], autofs_path, p);
|
return automountd_loop(pipes[0], autofs_path, p);
|
||||||
|
|
||||||
err:
|
err:
|
||||||
@@ -599,6 +601,7 @@ static int start_automounter(struct autofs_params *p)
|
|||||||
close(control_fd[0]);
|
close(control_fd[0]);
|
||||||
exit(automountd(p, control_fd[1]));
|
exit(automountd(p, control_fd[1]));
|
||||||
}
|
}
|
||||||
|
task_waiter_wait4(&t, pid);
|
||||||
p->pid = pid;
|
p->pid = pid;
|
||||||
|
|
||||||
close(control_fd[1]);
|
close(control_fd[1]);
|
||||||
@@ -877,6 +880,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
test_init(argc, argv);
|
test_init(argc, argv);
|
||||||
|
|
||||||
|
task_waiter_init(&t);
|
||||||
|
|
||||||
if (mkdir(dirname, 0777) < 0) {
|
if (mkdir(dirname, 0777) < 0) {
|
||||||
pr_perror("failed to create %s directory", dirname);
|
pr_perror("failed to create %s directory", dirname);
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user