Commit Graph

82 Commits

Author SHA1 Message Date
Mike Blumenkrantz 511ee4e6f4 tests/eldbus: add va_end for va_args usage in message test
Summary: CIDs 1400977, 1400974

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10390
2019-10-18 13:28:48 -04:00
Stefan Schmidt 04e3eff845 tests: eldbus: fix heap use after free error detected by address sanitizer
Using the just unref'ed message in the call next line is not going to
end well.

==26321==ERROR: AddressSanitizer: heap-use-after-free on address 0x603000001210 at pc 0x7fc456fd37f5 bp 0x7fff37a00a50 sp 0x7fff37a00a40
READ of size 4 at 0x603000001210 thread T0

    #0 0x7fc456fd37f4 in eldbus_message_path_get ../src/lib/eldbus/eldbus_message.c:193
    #1 0x42f6ab in utc_eldbus_message_ref_unref_p ../src/tests/eldbus/eldbus_test_eldbus_message.c:877
    #2 0x7fc456a27744 in srunner_run_tagged (/lib64/libcheck.so.0+0x6744)
    #3 0x406a01 in _efl_suite_run_end ../src/tests/eldbus/../efl_check.h:282
    #4 0x407357 in _efl_suite_build_and_run ../src/tests/eldbus/../efl_check.h:403
    #5 0x407925 in main ../src/tests/eldbus/eldbus_suite.c:49
    #6 0x7fc45685df32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
    #7 0x405d8d in _start (/home/stefan/EFL/efl/build/src/tests/eldbus/eldbus_suite+0x405d8d)

ref T8142

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9755
2019-08-29 09:41:53 +02:00
Mike Blumenkrantz d35b06497a tests/eldbus: fix broken unit test
this callback isn't called during the main loop, so attempting to
quit the loop has no effect and the test deadlocks

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9367
2019-07-19 15:04:54 -07: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
Marcel Hollerbach f9c83166be meson: lets execute eldbus test suite
Summary:
this was simply forgotten.
Depends on D8861

Reviewers: segfaultxavi, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8862
2019-05-08 12:27:41 -04:00
Marcel Hollerbach f69ae90d30 Revert "eldbus_test_eldbus_message: Fix resource leak"
Summary:
This reverts commit 24c07f03d1.

This appears to be wrong "eldbus_message_iter_del" does free the message
itself. So this causes a double free and a failing test suite.

Reviewers: segfaultxavi, zmike

Reviewed By: zmike

Subscribers: zmike, devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8861
2019-05-08 12:27:35 -04:00
Christopher Michael 24c07f03d1 eldbus_test_eldbus_message: Fix resource leak
Summary:
Coverity reports that we leak the variable 'msg' going out of scope
here, so lets add a call to unref the returned eldbus_message so it
gets freed

Fixes CID1400921

@fix
Depends on D8772

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8773
2019-05-02 13:47:33 +02:00
Vincent Torri 246ab7b254 eldbus unit test: fix warnings
Summary: include libgen.h so that basename() is declared

Test Plan: compilation

Reviewers: cedric, raster, zmike, devilhorns

Subscribers: #reviewers, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D8583
2019-04-09 12:34:19 +01:00
Marcel Hollerbach e43f090265 cmake: remove!
This build was never complete and also was not maintained probebly.

It is also dropped in favour of meson which is cool, merged, works & is fast.

Differential Revision: https://phab.enlightenment.org/D7010
2018-12-20 20:07:26 +01:00
Cedric BAIL d4d44d76f3 efl: make Efl.Model.properties_get return an Iterator<string>.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7289
2018-11-23 10:13:58 -08:00
Carsten Haitzler dd4eb20c75 eldbus tests - warn - fix func structs/arrays to init every field 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
Mike Blumenkrantz b2f2823cb8 tests: use unique dbus bus names for each eldbus test case fixture
Summary:
dbus bus names are unique and cannot be acquired by multiple connections
simultaneously; by making this per-file unique, this part of the test can
run in parallel without bus collisions

ref T6848
Depends on D6201

Reviewers: stefan_schmidt, cedric, bu5hm4n, ManMower, devilhorns

Reviewed By: ManMower

Subscribers: ManMower, cedric, #committers

Tags: #efl

Maniphest Tasks: T6848

Differential Revision: https://phab.enlightenment.org/D6202
2018-06-19 14:08:27 -04:00
Mike Blumenkrantz ed0c408089 tests: make statically-defined eldbus bus names unique
Summary:
if not unique, these bus names will collide if run from separate
connections resulting in test failure

fix T6848
Depends on D6203

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6848

Differential Revision: https://phab.enlightenment.org/D6204
2018-05-29 13:25:56 +02:00
Mike Blumenkrantz 7c777ef053 tests: use eldbus in dbus test naming instead of enlightenment
Summary:
these tests are for eldbus; enlightenment has its own dbus namespace and
should not be mentioned here to avoid confusion
Depends on D6202

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6203
2018-05-29 13:25:56 +02:00
Mike Blumenkrantz 3804ccd0e1 tests: print dbus errors on fail in eldbus_test_eldbus_message
Summary: Depends on D6200

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6201
2018-05-29 13:25:56 +02:00
Mike Blumenkrantz cba7f31a3a tests: print error messages when eldbus tests fail to acquire requested name
Summary: Depends on D6199

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6200
2018-05-29 13:25:56 +02:00
Mike Blumenkrantz 99894d258c tests: reduce duration of all timers in eldbus tests
Summary:
these values seem to assume that network latency or some other form
of delay exists in dbus communications. dbus is a local socket protocol,
so such lengthy timers do nothing but waste runtime

ref T6952
Depends on D6198

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6952

Differential Revision: https://phab.enlightenment.org/D6199
2018-05-29 13:25:56 +02:00
Mike Blumenkrantz 7a8076b228 tests: always use session bus for eldbus tests
Summary:
1eeb3cbdf7 causes all tests to run
inside a dbus session, so use this bus to avoid possible issues with
security policies

ref T6838
Depends on D6197

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6838

Differential Revision: https://phab.enlightenment.org/D6198
2018-05-29 13:25:56 +02:00
Mike Blumenkrantz 6421dd68fd tests: fix eldbus_test_eldbus_name_owner_changed test
Summary:
this is supposed to check an fdo dbus spec implementation, so the test
should exit with success after verifying it instead of waiting for a timeout

ref T6952
Depends on D6196

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6952

Differential Revision: https://phab.enlightenment.org/D6197
2018-05-29 13:25:55 +02:00
Mike Blumenkrantz c6304aed8c tests: remove eldbus_test_eldbus_main_loop
Summary:
this test has no relation to eldbus

ref T6952

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6952

Differential Revision: https://phab.enlightenment.org/D6196
2018-05-29 13:25:55 +02:00
Cedric Bail aaa827c2d2 eldbus: fix unref of eldbus to not throw warning all over the place.
Especially to note, that when giving a message to send, the caller
do not own it anymore and should not unref it.

Differential Revision: https://phab.enlightenment.org/D6092
2018-05-24 16:02:18 -07:00
Cedric Bail 71cd44c176 eldbus: object created with efl_add should be destroyed with efl_del.
Differential Revision: https://phab.enlightenment.org/D6090
2018-05-24 16:02:18 -07:00
Cedric BAIL 8bad7028ae eldbus: disable efl.model.child_del test as the behavior for eldbus.model.proxy is not defined yet. 2018-05-01 10:39:01 -07:00
Cedric BAIL d9ce6fac15 eldbus: disable efl.model.child_del test as the behavior for eldbus.model.object is not defined yet. 2018-05-01 10:39:01 -07:00
Cedric BAIL 702bcd7de9 eldbus: migrate tests to use new Efl.Model API. 2018-05-01 10:39:01 -07:00
Mike Blumenkrantz c45f134680 tests: enable some commented out eldbus tests
Summary:
these are able to run now that a dbus session is always launched
Depends on D5880

Reviewers: stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5881
2018-04-10 11:28:01 +02:00
Stefan Schmidt 63a390ecbc tests: eldbus: mark unused parameter as such 2018-04-06 12:01:39 +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
Cedric BAIL 46992cbed5 tests: do not call unref on eldbus message objects after sending them
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-19 13:00:25 -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 eda0c85910 eldbus: rename conflicting "name" properties for some classes 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz fcfd832ce5 eldbus: rename custom constructor methods
"constructor" conflicts with the base efl object constructor

some of the params for these should maybe be refactored into properties
and use finalize?
2018-02-15 13:11:00 -05:00
Lauro Moura 9b56d9a257 eldbus: Uncomment tests
These were commented out during the promises changes but seems to be
working now.
2018-01-25 15:27:05 -03: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
Mykola Solyanko ea63f487d3 Eldbus: add test suite for eldbus (eldbus_pending_data*)
Summary:
add tests for next API:
eldbus_pending_data_set()
eldbus_pending_data_get()
eldbus_pending_data_del()

Reviewers: cedric, NikaWhite, myoungwoon, raster, artem.popov

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5650
2017-12-19 14:42:56 +09:00
Mykola Solyanko 346e9a1904 Eldbus: add test suite for eldbus (eldbus_pending_cancel*)
Summary:
add tests for next API:
eldbus_pending_cancel()
eldbus_pending_destination_get()
eldbus_pending_interface_get()
eldbus_pending_method_get()
eldbus_pending_path_get()

Reviewers: cedric, NikaWhite, myoungwoon, raster, artem.popov

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5660
2017-12-19 14:41:22 +09:00
Carsten Haitzler d896a2365b eldbus test - del not unref obj as it has a parent ...
if you ONLy unref it wont force an unparent if you never del'd.

@fix
2017-12-15 14:16:53 +09:00
Mykola Solyanko 750e45e287 eldbus: add test suite for eldbus_proxy*
Summary:
add tests for next API:
eldbus_proxy_get()
eldbus_proxy_interface_get()
eldbus_proxy_object_get()
eldbus_proxy_call()
eldbus_proxy_ref()
eldbus_proxy_unref()
eldbus_proxy_send()
eldbus_proxy_method_call_new()
eldbus_proxy_send_and_block
eldbus_proxy_send_and_block()
eldbus_proxy_data_set()
eldbus_proxy_data_get()
eldbus_proxy_data_del()

Reviewers: cedric, NikaWhite, myoungwoon, raster, artem.popov

Reviewed By: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5644

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-12-13 10:27:48 -08:00
Jean-Philippe Andre 50fde448fb eldbus: "fix" make check
As Cedric told me, eldbus_suite now fails on this line, where somehow
the properties array contains 2 elements, instead of 0 as expected. It
seems that the change is not related to EFL, but a new package on our
systems.

With d-feet (a dbus inspection tool), I can see two properties under:
 org.freedesktop.DBus
   /org/freedesktop/DBus or /
     org.freedesktop.DBus
       Properties
         Features
         Interfaces

Has anyone a better clue what's happening?
2017-11-20 12:31:13 +09:00
Jean-Philippe Andre 28d74624ec tests/eldbus: Use different bus for cxx and C tests
I had eldbus_suite and eldbus_cxx_suite fail quite often for some
strange reason: name already in use... yeah but by who??? Turns out both
test cases used the same name, and when ran in parallel (make -j10
check) this would often fail.
2017-11-17 11:57:15 +09:00
Jean-Philippe Andre bae51a0612 tests: Add better debugging for eldbus failure
It keeps on failing for me, but quite inconsistently (i.e. sometimes,
not always). Annoying.
2017-11-17 11:57:15 +09:00
Jean-Philippe Andre 6f0a4c9822 eldbus: Fix test case (make check) 2017-09-19 16:53:25 +09:00
Mykola Solyanko 61cd8d912a eldbus: add test suite for eldbus (eldbus_signal_handler*)
Summary:
add tests for next API:
eldbus_signal_handler_add()
eldbus_signal_handler_del()
eldbus_signal_handler_connection_get()
eldbus_signal_handler_interface_get()
eldbus_signal_handler_member_get()
eldbus_signal_handler_path_get()
eldbus_signal_handler_sender_get()
eldbus_signal_handler_ref()
eldbus_signal_handler_unref()
eldbus_signal_handler_free_cb_add()
eldbus_signal_handler_free_cb_del()

Reviewers: cedric, NikaWhite, myoungwoon, raster, artem.popov

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4910

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 13:44:17 -07:00
Mykola Solyanko f024ca2ba8 eldbus: add test suite for eldbus (eldbus_message*)
Summary:
add tests for next API
eldbus_message_arguments_vget()
eldbus_message_arguments_append()
eldbus_message_error_get()
eldbus_message_from_eina_value()
eldbus_message_iter_struct_like_to_eina_value()
eldbus_message_iter_arguments_vappend()
eldbus_message_iter_arguments_vget()
eldbus_message_signature_get()
eldbus_message_method_return_new()
eldbus_message_error_get()
eldbus_message_iter_container_new()
eldbus_message_iter_fixed_array_append()
eldbus_message_method_return_new()
eldbus_message_error_new()
eldbus_message_iter_del()
eldbus_message_iter_fixed_array_get()
eldbus_hello()

Reviewers: cedric, raster, NikaWhite, myoungwoon, artem.popov

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4902

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07:00
Mykola Solyanko 17b5288a4c eldbus: add test suite for eldbus (eldbus_message*)
Summary:
add tests for next API
eldbus_message_iter_get()
eldbus_message_iter_signature_get()
eldbus_message_iter_arguments_get()
eldbus_message_iter_get_and_next()
eldbus_message_error_get()
eldbus_message_method_call_new()
eldbus_message_interface_get()
eldbus_message_member_get()
eldbus_message_path_get()
eldbus_message_sender_get()
eldbus_message_destination_get()
eldbus_message_arguments_get()
eldbus_message_error_get()
eldbus_message_signal_new()
eldbus_message_ref()
eldbus_message_unref()
eldbus_message_to_eina_value()
eldbus_message_iter_basic_get()
eldbus_message_error_get()
eldbus_message_iter_next()
eldbus_message_arguments_vappend()

Reviewers: cedric, raster, myoungwoon, NikaWhite

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D4649

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 13:25:47 -08:00
Gustavo Sverzut Barbieri 8dc853f230 ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
2017-02-03 12:36:38 -02:00