[LTP] [PATCH 1/1] lib: Retry safe_clone() on ENOSPC|EUSERS

Cyril Hrubis chrubis@suse.cz
Mon Mar 28 16:53:11 CEST 2022


Hi!
> +	/* too fast creating namespaces => retrying */
> +	if (pid < 0 && (errno == ENOSPC || errno == EUSERS)) {
> +		tst_res_(file, lineno, TINFO | TERRNO, "%s() failed => retrying",
> +				 pid == -2 ? "clone" : "clone3");
> +		usleep(100000);
> +		pid = tst_clone(args);

Wouldn't it make sense to use the exponential backof macro we have in
tst_common.h?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list