[LTP] [PATCH V2 1/2] ltp: Add the ability to specify the latency constraint

Cyril Hrubis chrubis@suse.cz
Thu Aug 17 15:50:30 CEST 2017


Hi!
> >> Yes, that make sense.
> >>
> >> Do you want keep the latency option for future use?
> > 
> > I tend not to add anything just in case that we may need it later in
> > order to keep the test library as small as possible, it's complex enough
> > even as it is. Moreover we can always add it easily when we find a test
> > that requires it.
> 
> Setting the latency to zero in tst_timer_start(), if the opening of the
> /dev/cpu_dma_latency file fails, we continue but issue a warning with 	
> 
> 	tst_resm(TWARN,
> 		"Failed to open '/dev/cpu_dma_latency': %s',
> 		strerror(errno));
> 
> is ok ?

Issuing TWARN marks the test as a failure, you should go for TINFO if
you want just inform the user about non-fatal problem.

Also are you sure that tst_timer_start() is the right place to open the
file? That function is called ~1000 times in each timer test hence this
would add quite a bit of overhead. Why don't we just put it into the
timer_setup() in the lib/tst_timer_test.c that is called once at the
start of the test?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list