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

Petr Vorel pvorel@suse.cz
Mon Mar 28 21:48:26 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?
+1 => I'll send v2.


More information about the ltp mailing list