[LTP] Broken Fedora build

Li Wang liwang@redhat.com
Thu Oct 22 07:47:38 CEST 2020


Xiao Yang <yangx.jy@cn.fujitsu.com> wrote:

> >> I prefer to go replace ftime() by gettimeofday() or clock_gettime()
> >> way to solve this from root.
> > +1
> >
> > I have seen the hugetlb.c and trace_sched.c code, they all use the
> > time to generate a random value for ftok or sched_priority. So using
> > gettimeofday() also looks ok.
> Hi,
>
> It is fine for me to replace ftime(), but I wonder if we can remove
> fime() and srand()/srandom() directly? :-)
> It seems unnecessary to set the seed for random number.

That's true, but random() will generate the same number each time.
I slightly tend to keep setting the seed by srandom() to get a different
randomized number for test variety.

-- 
Regards,
Li Wang



More information about the ltp mailing list