Page MenuHomePhabricator

tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions
ClosedPublic

Authored by CHAN on Jan 3 2020, 4:35 AM.

Details

Summary

Add below APIs.
ecore_wl2_window_commit
ecore_wl2_window_frame_callback_add, del
ecore_wl2_window_free
ecore_wl2_window_hide
ecore_wl2_window_shell_surface_exists
ecore_wl2_window_show
ecore_wl2_window_update_begin

+ Fix ecore_wl2_activated_get()

ref T8016

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
CHAN created this revision.Jan 3 2020, 4:35 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

CHAN requested review of this revision.Jan 3 2020, 4:35 AM
CHAN edited the summary of this revision. (Show Details)Jan 3 2020, 4:37 AM
CHAN added a reviewer: devilhorns.
CHAN retitled this revision from ecore_wl2_test: Adds ecore_wl2_window Test Cases. to tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions.
CHAN edited the summary of this revision. (Show Details)
devilhorns requested changes to this revision.Jan 3 2020, 6:37 AM

One little minor fix needed.

src/tests/ecore_wl2/ecore_wl2_test_window.c
866

Could you add a blank line between these 2 functions please ?

This revision now requires changes to proceed.Jan 3 2020, 6:37 AM
CHAN updated this revision to Diff 27963.Jan 5 2020, 6:01 PM

Fix code indentation.

CHAN added a comment.Jan 5 2020, 6:02 PM

@devilhorns Thank you for reviewing.

CHAN updated this revision to Diff 27964.Jan 5 2020, 8:00 PM

Fix code indentation.

@CHAN This looks good to me now, thanks for the changes :)

I do have one concern which is why I did not push this yet ... but basically What happens if someone does not have egl support built for EFL ?

I am wondering if we should perhaps wrap the egl code with an #ifdef ??

CHAN updated this revision to Diff 28001.Jan 7 2020, 5:20 PM

Check gl enabled or not.

CHAN added a comment.Jan 7 2020, 5:21 PM

@devilhorns I missed that case. thanks.

devilhorns accepted this revision.Jan 8 2020, 4:57 AM
This revision is now accepted and ready to land.Jan 8 2020, 4:57 AM
Closed by commit rEFL4ea865623df8: tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions (authored by Woochanlee <wc0917.lee@samsung.com>, committed by devilhorns). · Explain WhyJan 8 2020, 4:59 AM
This revision was automatically updated to reflect the committed changes.
devilhorns reopened this revision.Jan 8 2020, 7:22 AM

@CHAN I had to revert these tests because they can cause the Ecore_Wl2 test suite to timeout/stall. I executed them here and they would timeout/stall 75% of the time.

Can you describe your test environment that you used to work on these ?

This revision is now accepted and ready to land.Jan 8 2020, 7:22 AM
devilhorns requested changes to this revision.Jan 8 2020, 7:22 AM
This revision now requires changes to proceed.Jan 8 2020, 7:22 AM
CHAN added a comment.Jan 8 2020, 5:04 PM

@devilhorns

I'm working on ubuntu 18.04.

I install enlightenment with meson build -Dwl=true and drm disable.
and then open enlightenment with command 'enlightenement_start'

Then build efl with command 'meson build -Davahi=false -Dcxx=false -Decore-imf-loaders-disabler="ibus, scim" -Dharfbuzz=false -Dwl=true -Dx11=false'

After then running TC with command 'meson test ecore_wl2-suite'

The result is fine.

96%: Checks: 29, Failures: 1, Errors: 0
../src/tests/ecore_wl2/ecore_wl2_test_window.c:168:F:Window:wl2_window_output_find:0: Assertion 'out != ((void *)0)'    failed

Um.. please let me know timeout happen in which test case?

In D11007#208736, @CHAN wrote:

@devilhorns

I'm working on ubuntu 18.04.

I install enlightenment with meson build -Dwl=true and drm disable.
and then open enlightenment with command 'enlightenement_start'

Then build efl with command 'meson build -Davahi=false -Dcxx=false -Decore-imf-loaders-disabler="ibus, scim" -Dharfbuzz=false -Dwl=true -Dx11=false'

After then running TC with command 'meson test ecore_wl2-suite'

The result is fine.

96%: Checks: 29, Failures: 1, Errors: 0
../src/tests/ecore_wl2/ecore_wl2_test_window.c:168:F:Window:wl2_window_output_find:0: Assertion 'out != ((void *)0)'    failed

Um.. please let me know timeout happen in which test case?

@CHAN How can you run enlightenment as a wayland compositor without drm support ?

I ran these tests in Weston.

The timeout occurs with Any of the test cases which were added with this patch. When I noticed the timeout/hang, I commented out all of the test cases which were added with this patch, then started enabling each one individually. The first one I tested was the window_activated test, which caused the timeout/hang. I then proceeded to test the window_commit test case, which also timeout/hang.

CHAN added a comment.EditedJan 12 2020, 10:41 PM

@devilhorns

Yes in weston my sample app is not work.

When i tried to launch sample app the log said.

"zxdg_surfacc_v6@16: error 3: xdg_surface has never been configured. "
"_begin_recovery_maybe() Wayland Socket Error: Protocol error "

in enlightenement there is a "xdg_wm_base" value in global interface.
but weston there is no "xdg_wm_base" value in global interface.

Any idea about it?
i will try to figure out what is going on here.
Um... but i think the ecore_wl2 is not works well on weston.
weston doesn't have efl only protocols...
i dont have many experience about it though...
anyway i will look around more.

Please give me any advise for this.

I just run enlightenment_start and build efl on enlightenment then run the TC and sample test apps.

Thanks.

In D11007#209238, @CHAN wrote:

@devilhorns

Yes in weston my sample app is not work.

When i tried to launch sample app the log said.

"zxdg_surfacc_v6@16: error 3: xdg_surface has never been configured. "
"_begin_recovery_maybe() Wayland Socket Error: Protocol error "

in enlightenement there is a "xdg_wm_base" value in global interface.
but weston there is no "xdg_wm_base" value in global interface.

Any idea about it?
i will try to figure out what is going on here.
Um... but i think the ecore_wl2 is not works well on weston.
weston doesn't have efl only protocols...
i dont have many experience about it though...
anyway i will look around more.

Please give me any advise for this.

I just run enlightenment_start and build efl on enlightenment then run the TC and sample test apps.

Thanks.

In D11007#209238, @CHAN wrote:

@devilhorns

Yes in weston my sample app is not work.

When i tried to launch sample app the log said.

"zxdg_surfacc_v6@16: error 3: xdg_surface has never been configured. "
"_begin_recovery_maybe() Wayland Socket Error: Protocol error "

in enlightenement there is a "xdg_wm_base" value in global interface.
but weston there is no "xdg_wm_base" value in global interface.

Any idea about it?
i will try to figure out what is going on here.
Um... but i think the ecore_wl2 is not works well on weston.
weston doesn't have efl only protocols...
i dont have many experience about it though...
anyway i will look around more.

Please give me any advise for this.

I just run enlightenment_start and build efl on enlightenment then run the TC and sample test apps.

Thanks.

If we have certain tests that Need Enlightenment in order to work properly, then we should probably keep those tests isolated. What I mean is:

if (getenv("E_START"))
{

tcase_add_test(tc, wl2_window_commit);
tcase_add_test(tc, wl2_window_frame_callback);
tcase_add_test(tc, wl2_window_free);
tcase_add_test(tc, wl2_window_hide);
tcase_add_test(tc, wl2_window_shell_surface_exists);
tcase_add_test(tc, wl2_window_show);
tcase_add_test(tc, wl2_window_update_begin);

}

By putting them in an if block, we can ensure that they only run under Enlightenment.

CHAN updated this revision to Diff 28147.Jan 13 2020, 10:04 PM

Some of APIs only working on enlightenment.

CHAN added a comment.Jan 13 2020, 10:05 PM

@devilhorns That sounds reasonable. i put on the patch for that suggestion. Thanks

devilhorns accepted this revision.Jan 14 2020, 5:32 AM
This revision is now accepted and ready to land.Jan 14 2020, 5:32 AM
Closed by commit rEFL2010c2ce132a: tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions (authored by Woochanlee <wc0917.lee@samsung.com>, committed by devilhorns). · Explain WhyJan 14 2020, 5:34 AM
This revision was automatically updated to reflect the committed changes.