[LTP] [PATCH] memcg/functional: check several times if the process is killed

Cyril Hrubis chrubis@suse.cz
Tue May 24 11:18:19 CEST 2016


Hi!
> > >  	$TEST_PATH/memcg_process $2 -s $3 &
> > >  	pid=$!
> > > -	sleep 1
> > 
> > This sleep sure is useless.
> 
> Isn't it there to make sure, that SIGUSR1 handler had time
> to set up? (for example with single CPU and sched_child_runs_first == 0)

Looking at the code, you are right.

We should better change this for something more robust. Given that the
memgc_progcess does while (!flag_exit) sleep(1); in the main loop we may
as well wait till the process gets into the sleep state.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list