Hi!
> >>>
> >>> ...
> >>>
> >>> > You should use tst_brkm(TBROK|TERRNO, tst_exit, "mmap") here. As
> >>> > tst_brkm() exits when pointer to cleanup is not NULL.
> >>>
> >>> Actually, the exit should be dropped and the tst_brkm invocation
> >>> should be left alone. When NULL is specified as the second argument to
> >>> tst_brkm, it automatically calls tst_exit.
> >>
> >> I would disagree here.
> >>
> >> man tst_res
> >>
> >> ...
> >>
> >> If func is NULL, tst_brk() and tst_brkm return to the caller after all
> >> results have been printed.
> >>
> >> ...
> >>
> >>
> >>
> >> And the corresponding code in the lib/tst_res.c is
> >>
> >> ...
> >>
> >>        if (func != NULL) {
> >>                (*func)();
> >>                tst_exit();
> >>        }
> >>
> >> }
> >>
> >>
> >> Which seems like a dump interface to me, but once used this way in whole
> >> LTP, we cannot easily change that.
> >
> > !!!
> >
> > Crap. I've somehow gotten it backwards this entire time >:(...
> 
>     I took a quick look around the sourcebase and there are a number
> of ways where this is done incorrectly. I know it's an API change, but
> does it make sense just to call tst_exit() at the end of tst_brkm?
>     Also, tst_brkloop* is completely unused. I vote for that to be
> removed as well.

I'm pretty sure that this is misused in many places, as a matter of
fact, I could not remember single test that played 100% nice with the
LTP api.

This however needs extensive testing. Ideally each tests gets reviewed,
but I'm pretty sure we are lacking manpower for this. 

Still I vote for that change. Good luck with testing. ;)

PS: don't forget to change the docs


And when we are at it, we should consider removing unused (and sometimes
broken) functionality from include/usctest.h

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to