summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite (follow)
AgeCommit message (Collapse)Author
2018-03-20efl: replace efl_del with efl_unref for cases where no parent existsCedric BAIL
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20efl: use efl_add_ref to create objects which have no parentCedric BAIL
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-19eo: update tests to also use efl_add_ref correctly.Cedric Bail
2018-03-07eo: fix warning.Cedric Bail
2018-03-07eo: adjust test suite to take invalidate state into account.Cedric Bail
2018-03-03tests - eo - found eo_signals test is wrong... amazing it passed beforeCarsten Haitzler (Rasterman)
so it was listening for cb adds and dels... and or del of any cb except the cb add/del catcher was done.. it would fail... but ... the test actually added other cbs than this ... like: efl_event_callback_array_priority_add(obj, _eo_signals_callbacks(), -100, (void *) 1); a while array of cb's: { EV_A_CHANGED, _eo_signals_a_changed_cb }, { EV_A_CHANGED, _eo_signals_a_changed_cb2 }, { EV_A_CHANGED, _eo_signals_a_changed_never }, { EFL_EVENT_DEL, _eo_signals_efl_del_cb }); none of which were _eo_signals_cb_added_deled. i am amazed it passed before... now switch its checks to check for itself and then check for anything BUT itself...
2018-03-03ecore - a different take on efl.app class as a super class to efl.loopCarsten Haitzler (Rasterman)
so the MAIN loop is actually an efl.app object. which inherits from efl.loop. the idea is that other loops in threads will not be efl.app objects. thread on the creator side return an efl.thread object. inside the thread, like the mainloop, there is now an efl.appthread object that is for all non-main-loop threads. every thread (main loop or child) when it spawns a thread is the parent. there are i/o pipes from parnet to child and back. so parents are generally expected to, if they want to talk to child thread, so use the efl.io interfaces on efl.thread, and the main loop's elf.app class allows you to talk to stdio back to the parent process like the efl.appthread does the same using the efl.io interfaces to talk to its parent app or appthread. it's symmetrical no tests here - sure. i have been holding off on tests until things settle. that's why i haven't done them yet. those will come back in a subsequent commit for really quick examples on using this see: https://phab.enlightenment.org/F2983118 https://phab.enlightenment.org/F2983142 they are just my test code for this. Please see this design document: https://phab.enlightenment.org/w/efl-loops-threads/
2018-01-10eo: Add "destruct" eventJean-Philippe Andre
Triggered after (almost) complete destruction of the object. Not called "deleted" because the other event is already "del". I don't like "destruct" much but this follows the terminology of "constructor" / "destructor". @feature
2017-12-05eo: Move hacky API auto_unref to C onlyJean-Philippe Andre
This API is meant to be used by parts only, and by bindings dealing with part objects. This patch fixes make check which got broken in the after the previous one (cxx).
2017-11-08eo: Rename efl_ref_get to efl_ref_countAndy Williams
2017-10-18eo: Add beta API for auto_unref after a callJean-Philippe Andre
Before screaming in horror (C++...) here's why we may need this: Efl.Part.part API returns an object that is by definition valid for a single function call only. Enforcing this in practice is actually quite hard as all implementation functions must manually take care of the life-cycle. This is a lot of code in many places and a lot of opportunities to forget to properly handle that life-cycle. Also, this means any invalid function call on a part will leak an object. This API absolutely must remain either "internal" or "beta" and definitely not become abused by applications. On top of that such an API can cause great trouble for bindings like C++. As a consequence, only specially crafted APIs like efl_part() should return an object marked as auto_unref. Alternatively this API could be defined in Eo.h or some other Eo_Internal.h. I placed it in efl_object.eo because it's much more convenient :) (read: I'm lazy) **** Performance notes: Tested with clang & gcc (with -O2), I had a look at the output of perf top, in particular the asm view. I used eo_bench in a loop. My conclusions are: - EINA_LIKELY/UNLIKELY actually works. The jump statement varies according to the expectation. I highly doubt all those ugly goto in eo.c / Eo.h are even useful. - The impact of auto_unref on a call_resolve is so small it doesn't even appear in the trace. It is significant inside call_end, though (obviously, that function is just a few lines long). That function accounts for ~1% to ~4% of all CPU time. The impact of auto_unref in call_end is ~4% of the function time. This means ~0.16% of all CPU time (worst measured case). _efl_object_op_api_id_get simply doesn't show up because of caching, so the extra check there is negligible. PS: I also tested EINA_LIKELY/UNLIKELY by compiling with -O2 and looking at the output with objdump. The flag is well respected, and the jump instructions are what you would expect (no jump for LIKELY and jump for UNLIKELY). Conclusion: The goto's in eo.c only make the code harder to read...
2017-09-29eo: introduce function definitions with fallbackMarcel Hollerbach
there can be cases where the call to such a function is never going to be directed to the actual implementation. In those cases the FallackCall will be called.
2017-09-13eo: Add class name to error log (unref)Jean-Philippe Andre
2017-08-11eo: Check refs in efl_data_scope_safe_getJean-Philippe Andre
This makes sure the object is actually still alive and kicking before returning any data. Otherwise the "safe" word is a bit of an abuse... Ref T5869 @fix
2017-08-04Eo: Allow multiple functions overridesJean-Philippe Andre
This allows two things: - adding new override functions on an object that already has overrides - resetting a specific function (or list of functions) to the parent class implementation by passing NULL as implementation Fixes T5580 @feature
2017-06-14eo: Add API efl_data_scope_safe_getJean-Philippe Andre
This is a safe version of efl_data_scope_get, meaning that it will return NULL if the object is not of the required type, or if there is no data for that class, or if the given class was used as an interface (and isn't a mixin). @feature
2017-04-19eo: Add new API efl_castJean-Philippe Andre
This is similar to efl_super but the specified class is the one we want to call the function on. This is similar to dynamic_cast<> in C++. Note: both efl_super() and efl_cast() need documentation! This is an experimental feature. Fixes T5311 @feature Maniphest Tasks: T5311 Differential Revision: https://phab.enlightenment.org/D4797
2017-03-06tests: Remove CPU affinity from all threadsJean-Philippe Andre
I believe that all the threads created in our test suite should be spawned without any special CPU affinity. The default parameter is not 0 (corresponds to the first CPU, known as CPU 0) but -1. Similarily the default priority is NORMAL (1), not 0 (URGENT). This also affects two unused code paths: evas render2 and gl preload. @fix
2017-02-16eo: ensure the generation is correctly clampedMarcel Hollerbach
Summary: when a few recursive event emissions are happening, and in some deep recursive level a subscription to the same object is happening, the subscription would just be executed when the complete recursion is done. that is wrong. The subscription needs to be executed when the event is called after the subscription is added, undepended from any recursive level. That fixes that and adds a regression test for it. This was discovered in e, since e gives a lot of error messages about a eo object that is already freed. It turned out this object is returned from evas, and exactly the above happened to the EFL_EVENT_DEL subscription of that object. Test Plan: make check Reviewers: tasn, cedric, stefan_schmidt Subscribers: stefan_schmidt, netstar, zmike, raster, jpeg Differential Revision: https://phab.enlightenment.org/D4656 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-03ifdef RUN_IN_TREE logic.Gustavo Sverzut Barbieri
This logic is only needed for autotools, cmake will replicate the installation file structure and thus eina_prefix works out of box.
2017-01-23cmake: add eoMarcel Hollerbach
2016-12-07Eo tests: Adjust according to latest commit.Tom Hacohen
2016-12-05eo: Fix test caseJean-Philippe Andre
The exact error message has changed. Another test case is still broken.
2016-12-02eo: add new test case to check event emission while emittingMarcel Hollerbach
2016-12-02eo: use the event stack to define behaviourMarcel Hollerbach
subscriptions are only executed if they were already subscriped at the start of the event emission.
2016-12-02eo: add testcase to check emission of eventsMarcel Hollerbach
2016-10-28Eo: Add a method to mark objects for reuse.Tom Hacohen
This informas eo an object is going to get reused/cached, so eo can reset the object appropriately. @feature.
2016-10-21Eo: Add test for refcount in efl_add_refTom Hacohen
This commits adds a regression test to the previous commit.
2016-10-21Eo: Fix references of objectsTom Hacohen
2016-10-21Eo test: Fix cleanup of objects.Tom Hacohen
2016-10-19Eo: Add a regression test for ref leak in function resolveTom Hacohen
This adds a regression test for the last commit.
2016-10-19Eo: Remove no longer relevant tests.Tom Hacohen
2016-10-06eo: Fix deadlocks with composite objectsJean-Philippe Andre
This happens with shared objects. The situation seems to be: 1. object has composited object a of class A in thread 1 2. call something on object a from thread 2, deadlock In fact, do anything from thread 2 on a shared object and you deadlock.
2016-10-06eo: Fix deadlock in efl_parent_setJean-Philippe Andre
If the object is shared and the given parent is invalid (eg. deleted) then we will deadlock later. This also adds a test case with it.
2016-10-06eo: Test deadlock after finalize (shared objects)Jean-Philippe Andre
This is a test case for 258cfbbe8013b50a7d3f89ab863dab73fce Unfortunately there are many other functions that we should be testing, not just efl_finalized_get().
2016-09-09Eo: Change the way functions are registered to classesTom Hacohen
This change lets us remove a field from the structure that leads to around 20KiB more of saving in private dirty pages in elementary. This also looks a bit better and feels a bit cleaner. Breaks API and ABI.
2016-09-09Eo: don't allow object override to introduce previously undefined functions.Tom Hacohen
2016-09-09eo test suite - finish off the tests so we're testing all the featuresCarsten Haitzler (Rasterman)
testing all the core features of eo domains now. yes it could be a lot more extensive but it tests the important day to day cases. this is the case across most of our tests too - they dont really stress things out a lot.
2016-09-08Eo: Make function overrides implicit.Tom Hacohen
Before this commit, function overrides were explicit. That is, you'd have to explicitly state you were overriding a function instead of creating a new one. This made the code a tad more complex, and was also a bit more annoying to use. This commit removes this extra piece of information. This means we now store much less information per function, that will let us further optimise out structures in the future.
2016-09-08eo domain tests - make a start on them with some basic onesCarsten Haitzler (Rasterman)
this adds tests for some of the basic domain tests. doing the inter-thread ones is going to be much more.... fun.
2016-09-05Rename efl_self to efl_addedTom Hacohen
It has been discussed on the ML (thread: "[RFC] rename efl_self") and IRC, and has been decided we should rename it to this in order to avoid confusion with the already established meaning of self which is very similar to what we were using it for, but didn't have complete overlap. Kudos to Marcel Hollerbach for initiating the discussion and fighting for it until he convinced a significant mass. :) This commit breaks API, and depending on compiler potentially ABI. @feature
2016-09-05Adjust the EFL to the Eo class_initilizer changes.Tom Hacohen
2016-09-05Efl object: rename EFL_OBJECT_OVERRIDE_OPS_DEFINE.Tom Hacohen
It is now called EFL_OPS_DEFINE as it's used for general purpose ops definition.
2016-09-05Efl object: Simplify test that was unneededly prone to breakingTom Hacohen
2016-09-02eo: store registered callbacks in an array instead of a single chained list.Cedric BAIL
2016-08-30Efl object: Rename Eo_Event -> Efl_Event.Tom Hacohen
This is the last step of the Eo renaming efforts.
2016-08-26Efl Object: remove legacy callback calls from event_callback_callVitor Sousa
Efl.Object.event_callback_call no longer calls legacy smart callbacks; calling only event callbacks registered with the given event description pointer. Create the method Efl.Object.event_callback_legacy_call to inherit the old behavior from Efl.Object.event_callback_call, calling both Efl.Object events and legacy smart callbacks. Update all other files accordingly in order to still supply legacy callbacks while they are necessary.
2016-08-23Efl object: Don't pass events to eo class creation.Tom Hacohen
This was never used and there is no plan to ever use it. I'm going to soon add a different mechanism with which it will be possible to provide them again to Eo if ever needed without breaking ABI. Though it's unlikely it will ever be.
2016-08-15Eo: Finish the renaming of Eo to the EFL.Tom Hacohen
This renames all the rest of the API to the EFL namespace except for Eo_Event that will follow soon. Obviously breaks both API and ABI.
2016-08-11Change the EFL to follow the new Eo rename.Tom Hacohen