Commit Graph

66 Commits

Author SHA1 Message Date
Stefan Schmidt cf5df21557 tests: ecore_con another cert update to extend the time its valid to 100 years
Instead of forcing someone to look at this again in a couple of years we
can simply extend it to 100 years and expect this code does no longer
exist. :-)

For more details on the steps I used to generate and the problem in
ecore_con please see the original commit 3b835b57ff
2020-05-11 17:05:44 +02: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
Stefan Schmidt 3b835b57ff tests: ecore_con: renew test ssl certificate which expired in 2016
For our unit testing of ecore_con we have a sself-signed certificate for
localhost to do some of the tests. It expired in 2016 and this was not
really a problem so far. Starting from Debian 10 and Ubuntu 20.04 this
resulted in failures thought. Either the newer openssl version is more
strict or the config for Debian and Ubuntu is.

Anyway, time to generate a new one. Its valied until Sep 23 12:33:13
2024 GMT and I used the follwoing commands to generate the cert/key and
the second command to rmeove the key passphrase.

openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.pem -days 1600 -subj '/CN=127.0.0.1'
openssl rsa -in server.key -out server2.key

Someone has to do this again in 4 years. if we stillhave this code
around.
2020-05-07 15:38:38 +02:00
Mike Blumenkrantz ccf0106448 tests/ecore_con: clarify pointer usage in ecore_con_url tests
Summary:
this was pretty bizarre

CID 1401029

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10450
2019-10-18 13:29:57 -04:00
Cedric BAIL e5c1eb5747 ecore_con: do not crash in test if nothing is returned by Ecore_Con_Url.
Summary: Depends on D10362

Reviewers: zmike, bu5hm4n, segfaultxavi, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10363
2019-10-11 09:25:04 -04:00
Vincent Torri 3ddbda1266 remove last bits of Evil.h in tests and use evil_private.h instead
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9154
2019-06-24 09:01:25 -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
Marcel Hollerbach 37d2d378ec eolian: drop class function overriding
Until this commit eo did class functions as part of the vtable, which
enabled those functions to be overwritten in classes inheriting another
class. However in task T7675 we decided that this is not really good for
bindings, as most OOP languages do not support this sort of feature.

After this commit eolian realizes class function completly outside of
the vtable, the c-symbol that is the class funciton is now just directly
redirecting to a implementation, without the involvement of the vtable.

This also means a change to the syntax created by eo:

Calling before:
  class_function(CLASS_A);
Calling after:
   class_function();

Implementation before:
   class_function(const Eo *obj, void *pd) { ... }
Implementation after:
   class_function(void) { ... }

This fixes T7675.

Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br>

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D7901
2019-02-13 16:59:58 +01:00
Vincent Torri f7c560c311 replace hton and ntoh family functions with ones defined in eina
Summary: This fixes especially the execution of edje_cc on Windows

Test Plan: execution of edje_cc

Reviewers: cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7834
2019-02-01 14:25:35 +00: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 5e440beb71 ecore_con: no need for a long timeout when we know the test is supposed to timeout.
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7422
2018-12-07 14:30:35 +01:00
Cedric BAIL d4cb52815d ecore_con: properly track each handler separately and destroy each only once.
Differential Revision: https://phab.enlightenment.org/D7400
2018-12-06 09:29:28 +01:00
Cedric BAIL 355859373e ecore_con: reinit ecore_con after complete shutdown so that suite ecore_con_shutdown doesn't complain.
Differential Revision: https://phab.enlightenment.org/D7399
2018-12-06 09:29:28 +01:00
Cedric BAIL 6967f0a797 ecore_con: fix multi shutdown excessive warning by initializing ecore independently.
Differential Revision: https://phab.enlightenment.org/D7398
2018-12-06 09:29:28 +01: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 53fa0c1520 tests/ecore-con: add a global timeout timer for all tests
Summary:
it's possible for many tests in this suite to hang indefinitely, so ensure
that they terminate eventually instead of holding up the build

ref T6838

Reviewers: stefan_schmidt, bu5hm4n, devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6838

Differential Revision: https://phab.enlightenment.org/D6542
2018-07-10 11:06:53 +09:00
Mike Blumenkrantz 3c8bc31e75 tests/ecore-con: fix dns test to use correct ordering
Summary:
it's unclear to me why this test was implemented with the expected
event ordering of SERVER_DEL -> SERVER_ERROR; going as far back
as efl 1.7, the behavior has always been ERROR -> DEL

this fixes the test to verify the expected event ordering on a dns
resolve failure
Depends on D6481

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6482
2018-07-03 12:44:13 -04:00
Marcel Hollerbach 3846750b2d ecore_con: fix possible segfault
with -O3 i get a segfault in this test. (with gcc and clang)
It looks like the compilers are doing constant folding because we
declared the struct as constant, however, due to using the address of
the fild the keyword const is simply not true, thus we are getting a
segfault because the address returned by &desc is not correct anymore,
due to the fact the constants are rolled out.

Differential Revision: https://phab.enlightenment.org/D6309
2018-06-18 12:48:58 +02: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 33fd77e9e4 ecore: move close_on_destructor to close_on_invalidate as that describe the behavior best.
Fix all use to correctly behave on invalidate.
2018-05-01 10:39:01 -07:00
Cedric BAIL ec44120e93 ecore_con: migrate efl_net_ip_address_resolve to use Eina_Future. 2018-05-01 10:39:01 -07: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
Marcel Hollerbach b8f4dc296f ecore_con: switch from 1234 to AF_UNSPEC
there are systems where sa_family_t is a enum, so assigning 1234 will
lead to compililation errors on picky systems
2018-01-02 14:35:31 +01: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 25747d0881 ecore: rename efl_loop_Eina_FutureXXX_timeout to efl_loop_timeout. 2017-12-03 16:30:53 -08:00
Cedric Bail 7d229efda5 ecore_con: use eina_future based timeout for tests. 2017-12-01 00:38:43 -08:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Carsten Haitzler e1605e6405 tests - make ecore con test suite reliable and work
basically ecore_con's test suite was broken. ipv6 checks were broken.
you now need to set an env var to get ipv6 tested. using eocre_con to
detetc it didnt init eina or ecore_con and if you do init these then
the other tests that check return values from these fail... so make it
an env var if you want to test ipv6. now it's reliable and works!
2017-07-29 14:56:57 +09:00
Ivan Furs 3d6212b8f2 removing duplicates winsock2.h
Summary:
winsock2.h included in Ecore.h
But Ecore.h ' is included in
/bin/efreet/efreet_desktop_cache_create.c
src/bin/efreet/efreet_mime_cache_create.c
src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c

Reviewers: NikaWhite, cedric, raster, an.kroitor

Reviewed By: raster

Subscribers: artem.popov, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4687
2017-03-07 13:59:54 +09: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
Gustavo Sverzut Barbieri f6cac7ed9a cmake: add ecore_con. 2017-01-27 17:26:05 -02:00
Gustavo Sverzut Barbieri e2c0b7741b tests/ecore_con: skip ipv6 tests if that's disabled on the running system. 2016-12-19 15:49:16 -02:00
Gustavo Sverzut Barbieri dd5cdda64b more eo simplified to use Eina_Slice instead of pointer to.
Working directly with Eina_Slice is easier than a pointer to it,
requires no validation of the pointers and is cheap since it's just
putting together size_t + void*.

However we can't hint the user of 'const(Eina.Slice)' properties as
Eolian is incorrectly generating getters as:

   const Eina_Slice class_property_get(...)

which is makes compilers complain about ignored qualifiers:

   ../src/lib/ecore/efl_io_copier.eo.h:329:7: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]

Leave some TODO so @q66 can fix those.
2016-12-19 15:30:56 -02:00
Cedric BAIL f553c92091 ecore_con: fix incompatible type warning. 2016-12-15 09:59:41 -08:00
Cedric BAIL 59bf58829c ecore_con: fix misleading indentation warning. 2016-12-15 09:55:11 -08:00
Daniel Kolesa ca50a4de4c ecore con tests: fix missing include 2016-12-14 18:23:16 +01:00
Gustavo Sverzut Barbieri c4ab9882e1 test efl_net_ip_address: also check localhost6.
Fedora and other systems use localhost6 for ::1, then use that in
addition to localhost.
2016-12-12 12:27:45 -02:00
Gustavo Sverzut Barbieri 8415626397 test efl_net_ip_address: check if /etc/hosts has '::1 localhost'
it seems that the bot and some users do not have ::1 localhost in
/etc/hosts, check for that and print it out.

be more verbose on resolve errors, showing the results and error code.

also allow more time for resolution, otherwise the local timeout may
expire before getaddrinfo() returns with failures.
2016-12-12 11:22:16 -02:00
Gustavo Sverzut Barbieri 633ec445b8 efl_net: add Efl.Net.Ip_Address
This is a string parser, serializer and asynchronous resolver.

It's purpose is to convert to and from the strings we use in our
dialers and servers, such as "127.0.0.1:1234" or "[::1]:1234",
properties allow to check the family, port, address bytes (slice) and
even get a struct sockaddr pointer to use with bind()/connect() in
outside code.

It will also offer some utilities present in netinet/in.h in an easy
to use way, after all IN6_IS_ADDR_LOOPBACK() works one way, while
there is no IN_LOOPBACK and comparing with INADDR_LOOPBACK will lead
to errors since it's in network order.

Last but not least, it will do asynchronous resolve of host and port
names using an internal thread and getaddrinfo(). The results are
delivered using a Future with an array of objects.
2016-12-12 02:30:33 -02:00
Carsten Haitzler 8889daa7c5 ecore con eet test - dont use localhost port 8080
so thats a common local port to use for other things... 8080 - don't
use it, so use 12346 much like 12345 is for the other tests. far less
likely to clash. fix up tests to work better.
2016-08-05 17:09:34 +09:00
Stefan Schmidt aad5b8b83e tests: ecore_con: make sure info is initialized
One test does init info before passing it to _url_compl_cb while two others
are not. Also test if inof is NULL in callback here to avoid crashes.

tests/ecore_con/ecore_con_test_ecore_con_url.c:194:4: warning: 'info' may be used uninitialized in this function [-Wmaybe-uninitialized]
    ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
2016-08-02 09:31:10 +02:00
Carsten Haitzler b8b41e6683 ecore-con tests - remove WRONG connect check
sothe ecore-con tests were calling ecore_con_server_connected_get()
every time a server was created on a NUL server object. WTF? this is
pointless. testing if an api returns tre on being connected on an
invalid object? all it does is create lots of eo noise. remove so we
can see the real errors in the output.

@fix
2016-05-24 09:20:49 +09:00
Vincent Torri b772a46437 Test rework #2: Ecore_Con 2016-02-16 12:41:06 +00:00
Srivardhan Hebbar c99d50e00b ecore_con: adding test case for ecore_con_url_status_code_get.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:21:44 -08:00