Commit Graph

44 Commits

Author SHA1 Message Date
Carsten Haitzler ebd24a4815 tests - disable fmt warn for fail/ck asserts bc of check added NULL
check adds a NULL and this messes the format warning checks in the
check macro - so disable this warning where this is done - warning
noise we don't need.
2024-05-30 17:40:16 +01:00
Mike Blumenkrantz e0cf299ae5 tests: resolve float comparison warnings
Summary: Depends on D11788

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11789
2020-05-09 09:25:14 +01:00
Mike Blumenkrantz 7a2fa2c614 tests/ecore: add intensive test for recursive timer usage
this recurses the mainloop to a depth of 8, continually creating and
triggering timers as it progresses and tracking the states to ensure that
everything is working as expected regardless of depth

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10547
2019-10-30 08:49:09 -07:00
Mike Blumenkrantz cb23d14d11 tests/ecore: make timer behavior test even more strict
we need to also verify that timers will process out of order solely based
on their timestamps and ignoring whether they are "recently-added"

additionally verify the behavior of timer interval changing and re-instantiating

ref T8434

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10530
2019-10-29 16:09:45 +01:00
Mike Blumenkrantz 0da0b8ea55 tests/ecore: add more grueling timer throughput test
this verifies that:
* newly-created timers are not triggered in the next loop iteration
* newly-created timers can be triggered the second loop after created
* multiple timers can be triggered in a single loop iteration
* timers are effectively added to the pending timer list

ref T8434

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10516
2019-10-29 16:09:00 +01:00
Hosang Kim a92274f811 ecore: fix that timers are not called in the order they were registered.
Summary:
Timers are not called in the order they were registered.
Because when current timer is deleted, getting next timer is called twice.

Test Plan:
<error>
Timer1 expired after 0.001 seconds.
Timer3 expired after 0.001 seconds.
Timer5 expired after 0.001 seconds.
Timer7 expired after 0.001 seconds.
Timer2 expired after 0.001 seconds.
Timer6 expired after 0.001 seconds.
Timer4 expired after 0.001 seconds.
Timer8 expired after 0.001 seconds.
<correct>
Timer1 expired after 0.001 seconds.
Timer2 expired after 0.001 seconds.
Timer3 expired after 0.001 seconds.
Timer4 expired after 0.001 seconds.
Timer5 expired after 0.001 seconds.
Timer6 expired after 0.001 seconds.
Timer7 expired after 0.001 seconds.
Timer8 expired after 0.001 seconds.|

{F3268233}

Reviewers: Hermet, Jaehyun_Cho, zmike, SanghyeonLee

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D6700
2018-08-02 09:14:15 -04:00
Mike Blumenkrantz 774ac32f69 tests/ecore: remove tolerance threshold from ecore_timer_reset test case
unit tests should test one thing only: testing timer accuracy and the
effectiveness of resetting a timer in the same test leads to timing issues,
so remove the timing component from the test

ref T6878

Differential Revision: https://phab.enlightenment.org/D6653
2018-07-30 17:40:57 +02:00
Mike Blumenkrantz d5a4fba118 tests: improve ecore timer test code
Summary:
a stack variable was incorrectly used here, along with some lazy timing
calcs which did not accurately measure the time for each timer iteration,
resulting in a test which intermittently failed in some cases

fix T6878

Reviewers: stefan_schmidt, bu5hm4n, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #committers

Tags: #efl

Maniphest Tasks: T6878

Differential Revision: https://phab.enlightenment.org/D6256
2018-06-12 10:52:12 -04:00
Mike Blumenkrantz fab4c313f4 tests: move disabled efl loop timer test into efl_app_suite
Summary:
ref T6815
Depends on D5895

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6815

Differential Revision: https://phab.enlightenment.org/D5896
2018-04-10 11:28:01 +02:00
Mike Blumenkrantz ab8237d36d tests: reduce duration of ecore_test_timers
Summary:
fix T6852
Depends on D5893

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6852

Differential Revision: https://phab.enlightenment.org/D5894
2018-04-10 11:28:01 +02:00
Mike Blumenkrantz 96da1551c5 tests: move ecore_test_ecore_main_loop_timer into timers test file
Summary: Depends on D5892

Reviewers: stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5893
2018-04-10 11:28:01 +02:00
Stefan Schmidt ea60b359a7 tests: ecore: remove no longer needed jenkins check function
After changes to the ecore_timer tests this function is no longer used
or needed. It can safely go.
2018-04-06 11:19:40 +02:00
Mike Blumenkrantz 624925fe6e tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions
in most cases, and many did not properly do this anyway

see followup commit which resolves some issues with eina tests

ref T6813
ref T6811

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:26 +02:00
Mike Blumenkrantz adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +02:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Myoungwoon Roy, Kim 6bb2b8b402 ecore_timer: Check for the valid callback func
Summary:
This patch checks whether the callback function is valid or not.
Callback function must be set up for the class.

Test Plan: Execute test suite

Reviewers: cedric, raster, stefan, Jaehyun_Cho

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5762
2018-01-30 14:43:11 +09:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Carsten Haitzler 5bd7beb53f tests - disable loop fd and timer lifecycle tests
these tests assume we delete the loop object on shutdown which we are
not doing atm as it's a lot of trouble... and frankly of little value.
2017-12-15 14:16:53 +09:00
Cedric Bail c6d4614f8c ecore: remove efl_loop_timeout tests. 2017-12-03 16:09:14 -08:00
Cedric BAIL d70bcb94cb ecore: add test to make sure that the timer reset during callback work as expected. 2017-02-07 16:39:02 -08:00
Stefan Schmidt d46829f0f9 tests: ecore: detect if the timeout test runs on Jenkins and increase allowed offset
From time to time we run into trouble with this test. It goes over the, already
increased, limit on Jenkins. Most likely due to high load on the server. Neither
Cedric nor me have been able to pin this down on local runs and we already had
increased it from the initial 0.01 to 0.02 but just today we hit 0.38.

What we do now is to detect if we run on our jenkins and increase the allowed value
while having the intial lower value back for normal local runs.
2016-12-09 11:09:47 +01:00
Stefan Schmidt a6d3c0d0fd tests: ecore: switch from fprintf to ck_asser_msg macro for custom error message
The ck_assert_msg macro can do this for us already in a failed case.
2016-09-20 12:46:37 +02:00
Cedric BAIL 71ec6a95b8 ecore: fix warning in timer test. 2016-09-19 16:27:14 -07:00
Stefan Schmidt c25d4e8325 tests: ecore: relax the timing precision for the promise timeout test
This test has been failing on Jenkins again and again. After adding the debug
a while ago it now shows that the value is between 0.01 and 0.02 in all cases
I have seen. Relaxing the timeout here a bit to make it pass in situation where
our CI is under load.
2016-09-19 14:01:19 +02:00
Cedric Bail b741580329 ecore: migrate job and timeout tests to use efl_future. 2016-09-15 21:49:08 -07:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
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-05 16:59:56 +01:00
Stefan Schmidt f52ffec5dd tests: ecore: add some debug for ecore timer test case
This tests fails on Jenkins from time to time. The timeout is to big. Adding
some debug here top see how far we are off when this happens.
2016-09-05 11:21:54 +02:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
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-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Cedric BAIL 86862e7179 ecore: fix typo in test.
Thanks Stefan.
2016-06-28 11:11:07 -07:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Cedric BAIL cd0b50fada ecore: add a tests that ensure we do implement lifecycle correctly. 2016-06-06 15:41:24 -07:00
Cedric BAIL b7facb2f0b ecore: add a test for detecting the double free problem. 2016-06-03 17:00:12 -07:00
Felipe Magno de Almeida e79eb53e8d eina: Remove Eina_Promise* parameter in promise callback
Remove not very useful parameter to eina_promise_then callbacks.
2016-06-03 18:15:57 -03:00
Felipe Magno de Almeida 8fec0d5139 eina: Remove unnecessary indirection to promises
Now when dealing with pointer types, we will not get pointer to
pointer semantics in callbacks and eina_promise_owner_value_set
for Eina_Promise.

It will work as expected:

Eina_Promise_Owner* promise = eina_promise_add();

void* p = malloc(sizeof(T));
eina_promise_owner_value_set(promise, p, &free);
2016-06-03 17:22:12 -03:00
Felipe Magno de Almeida 1ed8759e1a ecore: eldbus: Fix prototype for promise then_cb new prototype
Added Eina_Promise parameter and removed indirection for Eina_Error.
2016-05-26 13:35:07 -03:00
Cedric Bail 4f43c27450 ecore: promise for timeout and job are clearly never optional, so return them. 2016-05-20 02:25:48 -07:00
Cedric Bail 559441bdd5 ecore: make timeout test that the timeout does happen at least after it is supposed to.
The test had to been relaxed to allow the server to be overloaded !
2016-05-15 06:44:49 -07:00
Cedric BAIL a1bd7a7499 ecore: add timeout promise test. 2016-05-04 15:42:59 -07:00
Daniel Willmann 53e7fb6edc ecore_timer test: Pre-increment variable to prevent buffer overflow
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-12 10:10:25 +01:00
Cedric Bail 38543ae53b ecore: reduce risk of rounding error. 2013-04-12 11:19:39 +09:00
Vitaliy Venzak b3159a889c ecore: add ecore timer test.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-04-12 10:46:47 +09:00