Hi!
Currently we have a ugly hack that allows SAFE_MACROS() to be called
from test cleanup. See tst_brk() function in the tst_res.c especially:
/*
* If no cleanup function was specified, just return to the caller.
* Otherwise call the specified function.
*/
if (func != NULL) {
tst_brk_entered++;
(*func) ();
tst_brk_entered--;
}
if (tst_brk_entered == 0)
tst_exit();
This piece of code detects if tst_brk() was called from tst_brk() recursively
and aborts only if it gets back to the first instance, which is ugly and
non-intuitive.
It has been added here in order not to abort a cleanup() if one of the
SAFE_MACROS() has failed (in which case it calls tst_brkm()).
If nobody object in a week or so I would:
* Add a deprecation warning in case that SAFE_MACRO was called from a cleanup()
* Add a deprecation warning in case tst_brkm() was called recursively
* Patches that use SAFE_MACROS() or tst_brkm() in cleanup will not be accepted
anymore
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list