Re: [PATCH wayland] tests/resources-test: Fix wl_resource_post_event call

2014-01-06 Thread Marek Ch
The call is wrong, I posted it here: http://lists.freedesktop.org/archives/wayland-devel/2013-November/012141.html But without any reaction. Good that somobody else renewed it :) On 05/01/2014, Quentin Glidic wrote: > From: Quentin Glidic > > Signed-off-by: Quentin Glidic > --- > > I do not kno

[PATCH] comment wl_buffer function

2013-12-05 Thread Marek Ch
While writing the tests I also added doc comments, but forget to commit it. Maybe it will be useful for somebody who will be trying to read the code later. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mai

[PATCH] wayland-private: comment wl_buffer functions

2013-12-05 Thread Marek Ch
Add doc comment to wl_buffer_* functions --- src/wayland-private.h | 41 + 1 file changed, 41 insertions(+) diff --git a/src/wayland-private.h b/src/wayland-private.h index 70d338b..83398ed 100644 --- a/src/wayland-private.h +++ b/src/wayland-private.h @@ -

[PATCH 3/3] tests: add tests for wl_buffer_*

2013-12-05 Thread Marek Ch
Tests for wl_buffer_* functions from connection.c --- src/connection.c | 10 +- src/wayland-private.h | 10 ++ tests/Makefile.am | 7 +- tests/buffer-test.c | 247 ++ 4 files changed, 268 insertions(+), 6 deletions(-) create mode 1006

[PATCH 2/3] wayland-private: move struct wl_buffer into wayland-private.h

2013-12-05 Thread Marek Ch
So that it can be used in tests --- src/connection.c | 8 src/wayland-private.h | 7 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/connection.c b/src/connection.c index 1d8b61b..c85c669 100644 --- a/src/connection.c +++ b/src/connection.c @@ -43,14 +43,6

[PATCH 1/3] wayland-private: add define for testing static functions

2013-12-05 Thread Marek Ch
Just like in Weston tests. This macro expands to WL_EXPORT when being compiled in tests and to 'static' keyword otherwise. --- src/wayland-private.h | 7 +++ tests/Makefile.am | 5 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/wayland-private.h b/src/wayland-priv

[PATCH 0/3] Test static functions

2013-12-05 Thread Marek Ch
Hi, I did similar thing like is in Weston for testing static functions. Also, I wrote few wl_buffer unit tests. I appreaciate any comments :) P. S.: based on mailing here: http://lists.freedesktop.org/archives/wayland-devel/2013-November/012299.html Thanks, Marek Ch Marek Ch (3): wayland

Re: [PATCH/RFC] Scanner for tests

2013-12-03 Thread Marek Ch
On 3 December 2013 11:57, Pekka Paalanen wrote: > On Tue, 3 Dec 2013 11:40:19 +0100 > Marek Ch wrote: > > > Also, the UNIT_TEST define (or it's renamed alternative) have to be > > defined in both > > src/Makefile.am and tests/Makefile.am. Wouldn't it be bet

Re: [PATCH/RFC] Scanner for tests

2013-12-03 Thread Marek Ch
;s renamed alternative) have to be defined in both src/Makefile.am and tests/Makefile.am. Wouldn't it be better to handle this define via configure.ac in this case? Thanks, Marek Ch On 2 December 2013 22:18, Bryce W. Harrington wrote: > On Fri, Nov 29, 2013 at 04:36:56PM +0200, Pekka Paal

Re: [PATCH/RFC] Scanner for tests

2013-11-29 Thread Marek Ch
Thanks! I'll look at that :) Marek Ch On 29 November 2013 15:36, Pekka Paalanen wrote: > On Fri, 29 Nov 2013 14:52:30 +0100 > Marek Ch wrote: > > > > > Hi! > > > > I was looking into wayland's code and I saw static wl_buffer_* > > functions a

[PATCH/RFC] Scanner for tests

2013-11-29 Thread Marek Ch
est of wl_buffer_put. Cheers Marek Ch ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel

[PATCH 2/3] tests: scanner

2013-11-29 Thread Marek Ch
Scanner is program that crawles through given files and copies out every definition/declaration marked by WL_EXPORT_TEST. It saves these definitions into test-runner/tests-private.[ch] so that these definition can be tested. Using the scanner guarantee testing of current code of functions (contrary

[PATCH 1/3] tests: move test-runner into subdirectory

2013-11-29 Thread Marek Ch
It's nice to keep helper sources separately from tests sources. It's better for searching files as well as for extending the test-suite. Also, there were no need to compile each test with test-*.c files so I used them to create noinst library and link the tests against it. Now we don't need to att

[PATCH 3/3] tests: add wl_buffer tests

2013-11-29 Thread Marek Ch
Using scanner to have current code of wl_buffer_* static function, test their behaviour --- src/connection.c | 3 ++ tests/Makefile.am | 5 +++- tests/test-runner/Makefile.am | 1 + tests/wl_buffer-test.c| 64 +++ 4 files

Wayland tests

2013-11-26 Thread Marek Ch
mments are welcome :) Regards, Marek Ch P. S. it's continuation of http://lists.freedesktop.org/archives/wayland-devel/2013-October/011771.html ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/l

[PATCH v2] tests: fix compiler warnings and remove trailing whitespace

2013-11-21 Thread Marek Ch
Version 2 of the patch, I split the asserts. Marek Ch (1): tests: fix compiler warnings and remove trailing whitespace tests/connection-test.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) -- 1.8.4.2 ___ wayland

[PATCH] tests: fix compiler warnings and remove trailing whitespace

2013-11-21 Thread Marek Ch
Fix 'unused variable' and 'missing initializer' warnings and remove trailing whitespaces in connection-test --- tests/connection-test.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/tests/connection-test.c b/tests/connection-test.c index e284ea0..9f9

Re: [RFC] Object's pre-actions

2013-11-20 Thread Marek Ch
On 20 November 2013 16:40, Pekka Paalanen wrote: > On Wed, 20 Nov 2013 15:40:50 +0100 > Marek Ch wrote: > > > That is true, the race is there and I keep it in mind. But I'm talking > > about the case, when the global_remove event has been already > > dispatched

[PATCH 1/2] fixed-benchmark: remove warning

2013-11-20 Thread Marek Ch
Compiler warned about unused arguments --- tests/fixed-benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixed-benchmark.c b/tests/fixed-benchmark.c index 0719063..d4de363 100644 --- a/tests/fixed-benchmark.c +++ b/tests/fixed-benchmark.c @@ -93,7 +93,7 @@ bench

[PATCH] tests: fix bad arguments when posting event

2013-11-20 Thread Marek Ch
I was getting SIGSEGV in resources-test (arch linux, gcc 4.8.2) due to bad (no) arguments passed to wl_resource_post_event(). Although the event is not invoked it crashed in serialize_closure when handling arguments --- tests/resources-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH] tests: fix compiler warnings and remove trailing whitespace

2013-11-20 Thread Marek Ch
Fix 'unused variable' and 'missing initializer' warnings and remove trailing whitespaces in connection-test --- tests/connection-test.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/connection-test.c b/tests/connection-test.c index e284ea0..066b5b5 10

Re: [RFC] Object's pre-actions

2013-11-20 Thread Marek Ch
e on his side (that's just an example!) I know I'm a pedant but I'm just trying to validate the implementation against what is written in documentation. Regards Marek Ch On 18 November 2013 18:49, Pekka Paalanen wrote: > On Mon, 18 Nov 2013 16:54:03 +0100 > Marek Ch wro

[RFC] Object's pre-actions

2013-11-18 Thread Marek Ch
esult would be triggering an action defined by display (but on client side) on particular event coming. Is it any way useful (I can imagine it work for example for the global deletion) or is it just silly idea? Regards, Marek Ch ___ wayland-devel mailing

Re: Wayland integration tests

2013-11-15 Thread Marek Ch
s Regards, Marek Ch On 31 October 2013 16:46, Marek Ch wrote: > > "assread(...)" and "asswrite(...)" are not clever function names ;-) > > I know but I couldn't help myself xD Of course I can change the names. > > > > > >> This is ver

[PATCH] tests: move test-runner into subdirectory

2013-11-05 Thread Marek Ch
It's nice to keep helper sources separately from tests sources. It's better for searching files as well as for extending the test-suite. Also, there were no need to compile each test with test-*.c files so I used them to create noinst library and link the tests against it. Now we don't need to att

Re: Wayland integration tests

2013-10-31 Thread Marek Ch
urage developers and testers to adopt and use it more > and provide a nice framework for "generic" client<->server protocol testing. Yes, this definitely would be a huge advantage. > Would you be willing to entertain the idea of adding it to wayland? Sure, since it has only

Wayland integration tests

2013-10-30 Thread Marek Ch
(client can ask for emitting an event, or wait until display creates some object and similar) The tests are included in test/ folder but are not very complex yet. Here's the link: https://github.com/mchalupa/wayland-integration-tests I appreciate any comments

Globals deletion

2013-10-21 Thread Marek Ch
eat_get_pointer(seat) wl_seat_get_touch(seat) If I understand the documentation correctly then the wl_seat_get_{pointer|touch} should be ignored, because these are requests to already deleted object. Or am I missing something? Thanks, Marek Ch ___ w

[PATCH 3/3] tests: add wl_resource tests

2013-09-18 Thread Marek Ch
--- tests/Makefile.am | 4 +- tests/resources-test.c | 167 + 2 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 tests/resources-test.c diff --git a/tests/Makefile.am b/tests/Makefile.am index 3806cb6..9c673ae 100644 --- a/

[PATCH 2/3] tests: add unit tests for wl_signal

2013-09-18 Thread Marek Ch
Test wl_signal initialization, adding and getting listeners and emitting --- tests/Makefile.am | 4 +- tests/signal-test.c | 114 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 tests/signal-test.c diff --git a/tests/M

[PATCH 1/3] tests: extended message when leak in test is detected

2013-09-18 Thread Marek Ch
When memory or fd leak is detected, print how many blocks of memory were allocated and not freed, respectively how many files were opened/unclosed. --- tests/test-runner.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/test-runner.c b/tests/test-runner

Tests for wl_signal and wl_resource

2013-09-18 Thread Marek Ch
Hey, I wrote these tests, could you please review it? Additionaly, I modified test-runner so that now it prints how many leaks are present in test. Regards, Marek Ch ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http