Commit Graph

123 Commits

Author SHA1 Message Date
Christopher Michael 3e5629f125 eio_test_manager: Fix unchecked return value
Small patch to check return value of eina_value_convert reported by
Coverity

Fixes CID1400976
2021-02-25 09:33:42 -05:00
Marcel Hollerbach a25bc7e769 tests: fix eio tests
there are tests that init & shutdown efl_object in the same test, which
is since to switch to const _CLASS_GET dangerously wrong.

I checked for more cases but only found cases where no _CLASS_GET
macros where used.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12069
2020-07-28 10:05:54 +02:00
Stefan Schmidt b3bc1240a6 tests: eio: make sure we check return value
Make sure we fail the test if the call does not succeed.

CID: 1412364

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11963
2020-06-17 13:37:26 +02:00
Tom Callaway c245b576aa Fix build with gcc 10 (which has -fno-common enabled by default).
EFL failed to build from source in Fedora Rawhide as a result of the update to GCC 10. GCC 10 enables -fno-common by default, and this found three issues in EFL:

  # The eina benchmark code defined int key_size in a header that was included in multiple places.
  # The elementary test code defines the "dt1", "dt2", "dt3" vars in two code files which are compiled together (but these variables do not appear to be used globally)
  # The eio test code defines the "ee" var in two code files which are compiled together (but this variable does not appear to be used globally)

I've fixed these issues and confirmed locally that the code builds again in Fedora.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11259
2020-01-31 14:31:57 +01:00
Mike Blumenkrantz 81962dfa1b tests/eio: unlink tmpfiles after tests
Summary:
my tmpdir is full of thousands of these things
Depends on D9710

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9711
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz f9bd541e37 tests/eio: verify that the model monitor test's file is successfully created
Summary:
if this fails then the test will hang until timeout, so catch it earlier
Depends on D9709

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9710
2019-08-23 13:38:33 -04:00
Vincent Torri ba22016c4c tests: fix warnings and undef ref on Windows (using meson :-) )
Summary: we need to include evil_private.h so that some symbols are declared

Test Plan: compilation

Reviewers: raster, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9129
2019-06-20 12:50:35 +01:00
Mike Blumenkrantz 7c7998b3dc meson: enforce 61s timeout for tests, remove explicit timeouts from build files
unit tests automatically abort with info after 60s, and tests should be run with
an appropriate timeout to avoid conflict with the test runner's default 30s timeout

set explicit timeout in eio test for now because there's still frequent bugs here

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8894
2019-05-15 18:49:51 +02:00
Christopher Michael 1e0a206f6e eo_test_manager_xattr: Fix resource leak
Summary:
Coverity reports that we leak the eina_binbuf returned from
eina_value_to_binbuf function, so add a call to eina_binbuf_free.

Fixes CID1400953

@fix

Depends on D8762

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8769
2019-05-02 14:11:20 +02:00
Cedric BAIL 5d512229cb eio: do not fail when the future has been cancelled properly.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8691
2019-04-27 19:56:32 +02:00
Cedric BAIL f75675cb62 eio: remove unecessary printf from tests.
Summary: Depends on D8539

Reviewers: zmike, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8542
2019-04-17 12:35:06 -04:00
Cedric BAIL 40867cd0b8 eio: do not fail in case of early ECANCEL.
Actually with directory that contain a lot of file and the right order for them,
you would end up getting what you are looking for before you have triggered all
the future callback. In that case, all the future callback are cancelled and
we will get that notification. The test is not failing in this case as we already
got what we wanted.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8541
2019-04-06 13:13:41 -07:00
Yeongjong Lee e162ba9696 eio: add test to ensure proper lifecycle of Efl_Io object and futures.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8372
2019-03-27 15:03:31 -07:00
Cedric BAIL 301b05502c eio: enforce proper lifecycle for all Efl.Io_Model and fix discovered lifecycle bugs.
Summary:
This make sure that the object returned by children_slice_get are properly
destroyed when the refcount drop to only the parent holding a reference on
it. This make it clear that the user of the api can rely on efl_ref/efl_unref
to actually manage its use of the returned object.

Additionnaly we are cleaning up the created object that we are using to build our own
request inside the Efl.Io.Model and avoid internal leak.

Depends on D7864

Reviewers: felipealmeida, segfaultxavi, SanghyeonLee, zmike, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7528

Differential Revision: https://phab.enlightenment.org/D7865
2019-02-23 08:57:48 -05:00
SangHyeon Jade Lee 5525c89a3d efl_model : rename all efl_model based classes.
Summary:
As the result of discussion in T7458,
we need to rename all efl_model based classes with efl_XXX_Model sequence.
I've run few vote for this, see V42, V43
few classes are totally renamed as our consideration of misnaming.

| Efl.Model_Loop | Efl.Loop_Model |
| Efl.Model_Item | Efl.Generic_Model |
| Efl.Model_Container | Efl.Container_Model |
| Efl.Model_Container_Item | Efl.Container_Model_Item |
| Efl.Model_Composite | Efl.Composite_Model |
| Efl.Model_Composite_Boolean | Efl.Boolean_Model |
| Efl.Model_Composite_Boolean_Chlidren | Efl.Boolean_Model_Item |
| Efl.Model_Composite_Selection | Efl.Select_Model |
| Efl.Model_Composite_Selection_Chlidren | Efl.Select_Model_Item |
| Efl.Model_View | Efl.View_Model |
| Eio.Model | Efl.Io.Model |
| Efl.Ui.Model_State | Efl.Ui.State_Model |
| Efl.Ui.Model_Size | Efl.Ui.Size_Model |
| Efl.Ui.Model_Exact | Efl.Ui.Exact_Model |
| Efl.Ui.Model_Average | Efl.Ui.Average_Model |
| Efl.Ui.Model_Homogeneous | Efl.Ui.Homogeneous_Model |

I worried about Efl.Io.Model changes, cause it is widely used,
but as I tested, there is no issue found yet.

Eldbus.Model also may can changed Efl.Dbus.Model,
but I cannot found any class who using Efl.Dbus namespace,
so I left it future work.

Test Plan:
Run the Make Test,
it works well except Efl test about selection.
there are class inheritance problem exist in select_model,
I reported it and will fix it in another patch.

Reviewers: cedric, felipealmeida, woohyun, Hermet

Reviewed By: cedric

Subscribers: lauromoura

Tags: #efl, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D7533
2019-01-31 14:59:37 +09:00
Cedric BAIL f5172faebb efl: remove warning due to unused variable/parameters.
Reviewers: #committers, felipealmeida, zmike

Reviewed By: #committers, felipealmeida, zmike

Subscribers: zmike, YOhoho, Hermet, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7554
2019-01-09 14:54:54 -05:00
Marcel Hollerbach 117d94d90e eio-tests: fix deadlocking of the testsuite
what happens was is that efl_model_children_count_get trigger the
monitoring to start. However, that means that *sometimes* the created
file in this test was sometimes called in a ADDED event due to the
listing of files, and sometimes due to the event of a newly added file.
The problem here is that when the ADDED event is added due to the file
listing and not the monitoring, then there *could* be a ADDED event and
the deletion of the file will not trigger a REMOVED event. Which is a
bug.

However, up to this point it is not fully clear to me if this is
solvable with this setup of monitoring or not. So this test is changed
to not trigger this deadlock anymore, the idea of the test is still
tested, just in another way.

ref T7478

Differential Revision: https://phab.enlightenment.org/D7412
2018-12-20 14:05:58 +01:00
Carsten Haitzler f3cea4b53a eio test - fix 32bit test to use correct type for eina value get 2018-11-09 12:18:59 +00:00
Carsten Haitzler 309e5a57e1 eio test -0 fix lots of ecore event handler prototypes.... warn
lots of warnigns because the ecore event prototyeps were WRONG. you
must return true/fals if more handlers shoudl handle it or not... not
return nothing... these tests were just broken.
2018-11-09 11:43:59 +00:00
Carsten Haitzler 665a75378f xxx - fix eina_future_then calls to pass sotrage val - fix warns 2018-11-09 11:43:59 +00:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Shinwoo Kim f84408e325 tests: fix a build error on the 0.12.0 check
Summary:
(1) EFL_START_TEST(TEST_NAME) is defined as follows if you are using
    the 0.12.0 check:

  START_TEST(TEST_NAME) \
  _timing_start();

(2) START_TEST(__testname) is defined as follows
    (To make it simple I am using 'blah-blah' here):

static void __testname_fn (blah-blah);\
static const TTest __testname_ttest = { blah-blah };\
static const TTest * __testname = & __testname_ttest;\
static void __testname_fn (blah-blah)

For example we are using as follows in a test case:

EFL_START_TEST(evas_object_smart_paragraph_direction)
{
   ...
}
EFL_END_TEST

This made a build error.

Test Plan: make check

Reviewers: Hermet, zmike

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6969
2018-09-04 14:58:10 +09:00
Mike Blumenkrantz 96fb05705f tests/eio: add explicit test for eio_monitor_path_get()
Differential Revision: https://phab.enlightenment.org/D6846
2018-08-24 11:43:02 +02:00
Mike Blumenkrantz 82b6a248ce tests/eio: disable efreet cache for eio tests
Summary:
having this enabled slows down test execution by a significant amount
for some reason

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D6836
2018-08-16 10:16:44 -04:00
Mike Blumenkrantz e4f823934f tests/eio: increase monitoring test timeout to 1s
this should only affect CI builds, allowing more time for tests to
process on the insanely slow virtual hw

Differential Revision: https://phab.enlightenment.org/D6623
2018-07-26 08:55:59 +02:00
Mike Blumenkrantz 8a2a1c6488 tests: check eio monitors for fallback monitoring
the corresponding tests cannot be run when using fallback monitoring,
so be sure to skip them when fallback is detected to avoid erroneous
failure reporting

fix T7042

Differential Revision: https://phab.enlightenment.org/D6448
2018-06-28 18:08:45 +02:00
Mike Blumenkrantz a8a55870f9 tests: cancel the timeout timer when cleaning up eio tests
this timer could persist and cause cascading failures for subsequent
tests when running in non-forked mode

@fix

Differential Revision: https://phab.enlightenment.org/D6446
2018-06-28 18:08:45 +02:00
Mike Blumenkrantz 5b6ebfc03b tests: increase eio monitor+sentry test initial delay to 0.05s
this helps ensure that the fallback monitor can perform an initial
scan during the test while under load

fix T7042

Differential Revision: https://phab.enlightenment.org/D6445
2018-06-28 18:08:45 +02:00
Mike Blumenkrantz 8c89015795 tests: set monitoring interval for eio tests to 0.05s
Summary:
cpu usage is not an issue during test runs, we want the tests to finish
as fast as possible in all cases regardless of the cost. this resolves
the last remaining issue with eio tests where sometimes the fallback
monitor would trigger and the test suite would hang for 60+ seconds

fix T6915
Depends on D6248

Reviewers: stefan_schmidt, bu5hm4n, ManMower, devilhorns

Reviewed By: bu5hm4n, ManMower

Subscribers: bu5hm4n, cedric, #committers

Tags: #efl

Maniphest Tasks: T6915

Differential Revision: https://phab.enlightenment.org/D6249
2018-06-19 13:33:30 -04:00
Mike Blumenkrantz 229ba6d337 tests: use fixtures for eio tests
Summary:
remove a lot of duplicated code and make this test suite read more like
all the other suites

fix T6813
Depends on D6247

Reviewers: stefan_schmidt, bu5hm4n, ManMower, devilhorns

Reviewed By: bu5hm4n, ManMower

Subscribers: Hermet, bu5hm4n, cedric, #committers

Tags: #efl

Maniphest Tasks: T6813

Differential Revision: https://phab.enlightenment.org/D6248
2018-06-19 13:33:19 -04:00
Cedric BAIL ccb5642eb9 Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad0.

Most of this change where wrong as they didn't affect the destruction
of the object. efl_add_ref allow for manual handling of the lifecycle
of the object and make sure it is still alive during destructor. efl_add
will not allow you to access an object after invalidate also efl.parent.get
will always return NULL once the object is invalidated.

Differential Revision: https://phab.enlightenment.org/D6062
2018-05-24 16:02:17 -07:00
Cedric BAIL 790b17673f eio: delay tests until we have started listing some files. 2018-05-07 09:55:55 -07:00
Mike Blumenkrantz 2951473a59 tests: optimize eio tests
Summary:
by removing the sleep() calls and reducing timeout time, tests remain
as accurate while taking less than 5% of the required time to run

fix T6914

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric

Tags: #efl

Maniphest Tasks: T6914

Differential Revision: https://phab.enlightenment.org/D6047
2018-05-04 14:39:23 +02:00
Cedric BAIL e8e6fe1d8d eio: xattr eio manager tests to allocate for Eina_Future*. 2018-05-01 10:39:01 -07:00
Cedric Bail 994448edc4 eio: fix tests to properly process things as array not accessor. 2018-05-01 10:39:01 -07:00
Cedric Bail db589dd630 eio: fix efl.io.manager test after API const change. 2018-05-01 10:39:01 -07:00
Cedric BAIL 7712f04070 eio: update test to use the new EINA_VALUE_ARRAY_FOREACH. 2018-05-01 10:39:01 -07:00
Cedric BAIL 5b4d64ac13 eio: migrate tests to use new Efl.Model API. 2018-05-01 10:39:01 -07:00
Stefan Schmidt 054424af51 tests: eio: fix filename naming in two tests
The file names are derived from the test case names. These two seem to
have been overlooked when copying one test case to another.
I hoped this would fix my problems I have with the eio test suite
recently, but sadly it does not. Time to go on a git bisect tour.
2018-04-25 15:34:35 +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 2fb5cc3ad0 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad and
168849e8a0
2018-03-29 13:30:55 +09:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07: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
Mike Blumenkrantz 5025569f77 eio: sentry.del -> sentry.remove 2018-02-15 13:11:00 -05: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
Cedric Bail 348c71e9ec eio: update efl_io_manager_xattr_ls test to use Eina_Future. 2017-12-14 16:42:44 -08:00
Cedric Bail 0fb9af0506 eio: migrate efl.io.manager.ls to use Eina_Future. 2017-09-28 18:31:34 -07:00
Cedric BAIL 245ea06a65 eio: convert Efl.Io.Manager.stat() to return Eina_Future. 2017-09-27 16:32:58 -07:00