[CRIU] Re: [PATCH] zdtm: IPC semaphores migration test

Andrew Vagin avagin at parallels.com
Thu Feb 9 15:25:40 EST 2012


> +static int test_fn(int argc, char **argv)
> +{
> +	int id, key, val;
> +	int pid;
> +	int ret, fail_count = 0;
> +	int key_parent, key_child;
> +
> +	test_daemon();
> +
> +	key_parent = ftok(argv[0], 89063453);
> +	if (key_parent == -1) {
> +		err("Can't make parent key");
> +		return -1;
> +	}

You return a negative value from test_fn() again.

Let's rewrite code of do_test_fn() like this:

if (fn(..))
	exit(1);
exit(0);


More information about the CRIU mailing list