Commit Graph

2055 Commits

Author SHA1 Message Date
Yeongjong Lee 15cc9a65aa ecore_pipe: remove null check condition and fix segfualt on Windows
Summary:
This reverts commit 4917910b49.

4917910b break backward compatibility.

Reproduction:
   void pipe_handler(...);

   pipe = ecore_pipe_add(pipe_handler, NULL);
   ecore_pipe_write(pipe, NULL, 0);

Because of the null check condition, pipe_handler isn't called after 4917910b.
Some apps behavior which is written to expected to call pipe_handler was broken.

also, this patch fixed segfault during build on Windows

Test Plan: make on Windows

Reviewers: raster, zmike, vtorri

Reviewed By: zmike, vtorri

Subscribers: woohyun, cedric, #reviewers, #committers, zmike, vtorri

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6824
2018-08-17 12:42:35 -04:00
Mike Blumenkrantz 588830280f tests/edje: fix object parenting for swallow tests
Summary:
recent safety check patches exposed issues here where tests were
incorrectly written to pass evas objects as edje object parents,
resulting in new test failures after this began to be detected and
treated as an error

Reviewers: netstar

Reviewed By: netstar

Subscribers: netstar, cedric, #reviewers, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D6851
2018-08-16 19:47:32 +01: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
Yeongjong Lee 07692dc640 elm_image: create image object before call elm_image_object_get
Summary:
image object was created in group_add before 868e3308. if you call
elm_image_object_get before file_set, you can get NULL.
this patch avoid that.

Test Plan:
obj = elm_image_add(...);
img = elm_image_object_get(obj);

img should not be NULL.

Reviewers: Hermet, zmike

Reviewed By: zmike

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6828
2018-08-16 10:01:37 -04:00
Yeongjong Lee 25d4517fb9 tests/image: remove unused variable
Differential Revision: https://phab.enlightenment.org/D6843
2018-08-16 10:22:48 +02:00
Mike Blumenkrantz eb32d164a7 tests: add more info on failsafe timeout
if a test is continually deadlocking then it's useful to know which
test is failing to complete

Differential Revision: https://phab.enlightenment.org/D6785
2018-08-16 09:59:58 +02:00
Mike Blumenkrantz 440b7ce03f tests: add failsafe timeout for tests running in fork mode
some tests manage to deadlock themselves on travis, seemingly due to some
hard to reproduce issues which are a result of the extremely low amount of
resources available on travis builds

this adds a simple 'timeout' process which does nothing but sleep(60);
and then returns. the exiting of this process will cause the main test
process to break out of the deadlock and then exit instead of timing out
a ci build

Differential Revision: https://phab.enlightenment.org/D6697
2018-08-16 09:59:58 +02:00
Mike Blumenkrantz 672cacaaf6 tests/elm: remove elm_test_helper.(c|h) files
these timer functions are only used by fileselector and I'm trying to consolidate
timer usage

no functional changes

Differential Revision: https://phab.enlightenment.org/D6768
2018-08-15 10:20:55 +02:00
Mike Blumenkrantz e47c2d7006 tests/naviframe: add test to verify preserve_on_pop functionality
this adds a naviframe with button content and pushes/pops the stack
a couple times to see if a delete callback is called on the button

ref T7236

Differential Revision: https://phab.enlightenment.org/D6762
2018-08-15 09:51:18 +02:00
Mike Blumenkrantz 1c029b8fd9 tests/eina: suppress deprecated api warnings for eina abi test
Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: cedric, #reviewers, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D6810
2018-08-14 17:26:08 -04:00
Yeongjong Lee 95ea970cb6 tests/genlist: add focus test
This adds test for simulating focus state.
Differential Revision: https://phab.enlightenment.org/D6800
2018-08-14 15:00:58 +02:00
Marcel Hollerbach 92bb03d7f5 efl_ui_focus_manager: adjust pop history pop
It now searches for a element if the focus stack is empty.

Differential Revision: https://phab.enlightenment.org/D6801
2018-08-14 15:00:58 +02:00
Mike Blumenkrantz a7f65c75d9 tests/naviframe: namespace test function names
Summary:
no functional changes
Depends on D6759

Reviewers: stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: cedric, #committers

Tags: #efl_widgets, #efl_tests

Differential Revision: https://phab.enlightenment.org/D6760
2018-08-08 09:37:07 -04:00
Mike Blumenkrantz eb5bb9b35b tests/genlist: add full test for expanding and contracting a genlist item
Summary:
this adds a fairly complete test for simulating the expand and contract
of a tree item in a genlist, as triggered by a user clicking the expand arrow
on an item

presently this test fails, as it is set to abort if any error messages are
logged and there are a number of focus manager errors

ref D6737
ref T6837

Reviewers: bu5hm4n, Hermet

Reviewed By: Hermet

Subscribers: SanghyeonLee, cedric, #committers

Tags: #efl_tests, #efl_widgets

Maniphest Tasks: T6837

Differential Revision: https://phab.enlightenment.org/D6750
2018-08-08 09:36:33 -04:00
Mike Blumenkrantz 5b6dddbce6 tests/genlist: use genlist test namespace for test functions
Summary:
namespacing test function names makes test output easier to read.

no functional changes

Reviewers: SanghyeonLee

Reviewed By: SanghyeonLee

Subscribers: SanghyeonLee, cedric, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D6758
2018-08-08 09:36:27 -04:00
Mike Blumenkrantz d4bcd7c8eb tests/eolian: remove eolian_decl test
Summary:
<q66> just remove decl.eo and remove the eolian_decl test; it's useless
<q66> the reason: it used to be testing some specific API, which got replaced with more generalized API that is now used everywhere in the tests, so that specific test no longer has a purpose

resolves some compile errors due to type conflicts

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6773
2018-08-07 12:10:22 -04:00
Mike Blumenkrantz e8d40a04b9 tests/elm: when using buffer engine, clamp render and edje timing to 0.05s
Summary:
this sets manual render on buffer engine windows and dumps the render at every
interval in order to avoid doing any real rendering or animating or having to
wait on some irrelevant timing.

tests using buffer engine just want to complete as fast as possible, as they are
never being displayed anywhere, so just perform canvas operations (recalcs mostly)
and BAIL

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D6749
2018-08-06 16:26:52 +09:00
Shinwoo Kim 355effed5f test/evas: add to check smart class overriding
Summary:
If Evas_Smart_Class.move is overridden,
then user defined move function should be used.
Check if "https://phab.enlightenment.org/D6468" works or not.

Reviewers: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6740
2018-08-06 16:21:55 +09: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 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 6fbcff15db tests: check WIFEXITED to determine if test exited before using exit status
Summary:
the exit status value is not valid unless the process has terminated normally
by calling exit() or _exit(), so only use the status if this is true. otherwise
mark the process as a failed test
Depends on D6597

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D6600
2018-07-25 10:56:23 -05:00
Mike Blumenkrantz bc7cbaffb5 tests: limit per-suite forks to cpu count
this is mostly fine to thrash the cpus on beefy desktop computers, but
it completely destroys travis's wimpy 2cpu/2gb ram configurations and causes
all the tests to fail

instead, restrict forking to the number of cpus detected and wait until a fork
exits before beginning a new one

ref T7151

Differential Revision: https://phab.enlightenment.org/D6597
2018-07-25 09:50:11 +02:00
Andy Williams 1485cf9df5 elm_code: (cherry-pick) Support indentation styles that are purely tab based
read: Allow non-EFL style indentation.
This is off by default but is switched on if you turn 'tabs insert spaces' off
2018-07-22 17:02:23 +01:00
Marcel Hollerbach 655c5ee6e0 elm_test_focus: fix a testcase
Summary:
The test was checking that multiple register calls fail. However, we
made this more stable and are making register only error if the
configuration is not the same. This fixes that.

fix T7141

Reviewers: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7141

Differential Revision: https://phab.enlightenment.org/D6588
2018-07-13 10:22:45 -04:00
Mike Blumenkrantz 5794f6f7af tests/edje: add test to verify that swallow objects exist during DEL callback
Summary:
this mimics expected behavior by enlightenment

for 2.0, this behavior should likely be changed since the INVALIDATE event
should be the last expected point at which a parent<->child relationship
continues to exist in any form

ref D6540
Depends on D6554

Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6555
2018-07-12 16:29:51 +09:00
Mike Blumenkrantz b05a5cb4c7 tests/edje: split edje tests into separate files
Summary:
this will speed up tests and make it slightly less intimidating to
add new tests

Reviewers: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6554
2018-07-12 16:25:15 +09:00
Mike Blumenkrantz 9028fb5ac2 tests/ecore: remove ecore-drm test
Summary:
this caused DSO linker issues when enabled and was only testing
init+shutdown for a deprecated component which has not been actively developed
in some time

Reviewers: devilhorns, ManMower, bu5hm4n

Reviewed By: devilhorns, ManMower

Subscribers: bu5hm4n, ManMower, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6539
2018-07-10 14:44:44 -04: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
Derek Foreman 64c66dfca9 tests: Add a password callback for eet_test_identiy
Summary:
For whatever reason the test is stalling for me waiting for me to
entire a password at make time.  Provide one internally.

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6528
2018-07-09 16:39:56 -04:00
Mike Blumenkrantz b14ef34ab8 tests/eina: make inclusion for define explicit and more compatible
Summary:
signal.h is not included with all build options somehow, making this
a bit unreliable. also check for define existence for random platforms
which don't define this symbol

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6535
2018-07-09 13:31:45 -04:00
Mike Blumenkrantz 6ee58996e1 tests/ecore: check uid on ecore-file tests
Summary:
these tests will fail if run with root permission, so avoid checking them
when run as root

ref T7094

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7094

Differential Revision: https://phab.enlightenment.org/D6534
2018-07-09 13:31:20 -04:00
Mike Blumenkrantz 0f2a9e15cd tests/eo: add explicit test case for setting an object as its own parent
Summary: Depends on D6489

Reviewers: bu5hm4n, devilhorns

Reviewed By: bu5hm4n

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6490
2018-07-05 15:11:55 -04:00
Marcel Hollerbach 7a8ff655c8 elm_popup: ensure focus is emitted on this object
Summary:
This mirrors the focus property from the notify to the one from popup.

This is needed to establish legacy behaviour, as earlier popup was able to get focus.

ref T6707
Depends on D6510

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6707

Differential Revision: https://phab.enlightenment.org/D6511
2018-07-05 15:09:21 -04:00
Mike Blumenkrantz dca39ebec1 tests/eina: disable eina debug signal handling test in non-fork mode
Summary: signal tests can only be used in fork mode or else they just fail

Reviewers: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6477
2018-07-03 12:46:49 -04: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
Youngbok Shin f6acd6f9e4 Evas Textblock: Don't convert <br/> to <ps/> after changing text
Summary:
It was only happened when legacy newline is enabled. By default,
legacy newline is enabled. As I know, legacy newline option has
to change textblock's internal behavior. But, it shouldn't change
the given original text. It fixes T3399.

Test Plan: A Test case is included in Evas test suite.

Reviewers: Jaehyun_Cho, z-wony, tasn, woohyun, herdsman, Blackmole, devilhorns

Subscribers: #committers, zmike, raster, cedric, jpeg

Tags: #efl

Maniphest Tasks: T3399

Differential Revision: https://phab.enlightenment.org/D3874
2018-07-02 18:33:45 +03:00
Mike Blumenkrantz a62d254306 tests/eo: add explicit ref check when setting an invalid parent
Summary: ref f4a55e9266

Reviewers: bu5hm4n, devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6473
2018-06-29 10:21:02 +09: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
Hosang Kim df652673fe evas: move clearing cows to right place.
Summary:
Evas is child of main loop now, so evas is deleted when main loop is quitted.
In case of not calling evas_free() explicitly by app side, a crash occurs.
So move clearing cows to below ecore_shutdown().

Test Plan:
//Compile with:
//gcc evas_test.c -o evas_test `pkg-config --cflags --libs ecore evas`

#include <Evas.h>
#include <Ecore.h>

Eina_Bool
_timer_cb (void *data)
{
    ecore_main_loop_quit();
    return 0;
}
int
main(int argc, char *argv[])
{

   evas_init();
   Evas *evas = evas_new();
   Evas_Object *obj = evas_object_box_add(evas);
   Evas_Object *rect = evas_object_rectangle_add(evas);
   evas_object_color_set(rect, 255, 255, 255, 255);
   evas_object_resize(rect, 300, 400);
   evas_object_show(rect);

   evas_object_box_append(obj, rect);

   evas_object_show(obj);
   ecore_timer_add(2.0, _timer_cb, NULL);
   ecore_main_loop_begin();

   evas_shutdown();
   return 0;
}

Reviewers: devilhorns, cedric, jpeg, id213sin, woohyun, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6346
2018-06-27 07:50:31 -04:00
Mike Blumenkrantz 3a3fcfb423 tests: ignore ibus module in ecore-imf tests when DISPLAY is not set
Summary:
ibus module will refuse to load if DISPLAY is not set, so avoid failing
for no reason in this case
Depends on D6433

Reviewers: ManMower, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6434
2018-06-27 06:18:00 -04:00
Mike Blumenkrantz 21bba131c8 tests: avoid cascading failure in ecore-imf tests when not forking
Summary:
these tests explicitly call ecore_imf_init, so they must call ecore_imf_shutdown
even on failure cases to avoid propagating their failure to subsequent tests

ref T7085

Reviewers: ManMower, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7085

Differential Revision: https://phab.enlightenment.org/D6433
2018-06-27 06:17:45 -04:00
Mike Blumenkrantz 32cebe903d tests: split a large failure case for eina_file tests to provide more info
Summary:
each failure case should always be separate in order to provide the highest
degree of detail available if a test fails

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6373
2018-06-25 15:20:37 -04:00
Mike Blumenkrantz f4a55e9266 tests: add coverage for efl_parent_set with invalidated parent object
this hits a codepath which was otherwise never triggered by unit tests
2018-06-25 15:14:30 -04:00
Chris Michael 9a9970ae62 tests: Update edje test to wrap edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6403

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6404
2018-06-25 11:32:33 -04:00
Mike Blumenkrantz d2a703e7b8 tests: add some more failure cases for efl_parent_set in eo tests
ref T6837

Differential Revision: https://phab.enlightenment.org/D6358
2018-06-25 17:17:13 +02:00
Mike Blumenkrantz b2e3c483a8 tests: ensure class constructor is called in eo_domain test
failing to call this prior to the thread invocation would result in a CRI
from class initialization in a thread

ref T7003

Differential Revision: https://phab.enlightenment.org/D6333
2018-06-25 17:03:05 +02:00
Marcel Hollerbach 2ce15216c7 eo: get back the eo test suite
Summary: I accidently broke the test suite, due to missing rebuilds.

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6421
2018-06-25 11:00:59 -04:00