Re: [PATCH wayland 6/6] tests: Remove memory leak checking infrastructure

2018-08-28 Thread Peter Hutterer
On Wed, Aug 29, 2018 at 07:17:15AM +0100, Daniel Stone wrote: > There are far better ways to detect memory leaks, such as either > valgrind or ASan. Having Meson makes it really easy to use these tools > in our tests, and we can do that in CI as well. > > Having these local wrappers actually compl

Re: EXT: [PATCH wayland 6/6] tests: Remove memory leak checking infrastructure

2018-08-28 Thread Daniel Stone
Hi Ian, On Wed, 29 Aug 2018 at 07:45, Ray, Ian (GE Healthcare) wrote: > > On 29 Aug 2018, at 9.17, Daniel Stone wrote: > > @@ -200,7 +147,7 @@ run_test(const struct test *t) > > assert(sigaction(SIGALRM, &sa, NULL) == 0); > > } > > > > - cur_alloc = get_current_alloc_num(

Re: EXT: [PATCH wayland 6/6] tests: Remove memory leak checking infrastructure

2018-08-28 Thread Ray, Ian (GE Healthcare)
> On 29 Aug 2018, at 9.17, Daniel Stone wrote: > > There are far better ways to detect memory leaks, such as either > valgrind or ASan. Having Meson makes it really easy to use these tools > in our tests, and we can do that in CI as well. > > Having these local wrappers actually completely bro

[PATCH wayland 1/6] scanner: Plug two memory leaks

2018-08-28 Thread Daniel Stone
Found with both ASan leak sanitizer and Valgrind. We were trivially leaking the enum name for every arg parsed by the scanner which had one. If libxml-based DTD validation was enabled, we would also leak the DTD itself, despite diligently freeing the document, context, etc. Signed-off-by: Daniel S

[PATCH wayland 5/6] tests: Overly elaborate compiler warning workaround

2018-08-28 Thread Daniel Stone
Clang will rightly point out that example_sockaddr_un in socket-test will get discarded from the compilation unit as it is completely unused. Put in a couple of lines which of no value other than stopping Clang from complaining. Signed-off-by: Daniel Stone --- tests/socket-test.c | 7 ++- 1

[PATCH wayland 4/6] tests: Use volatile pointer for NULL dereference

2018-08-28 Thread Daniel Stone
Clang warns that it can silently discard a non-volatile write to a NULL pointer (perhaps it constitutes undefined behaviour?), and recommends changing it to volatile. This patch slavishly complies with the demand of the unfeeling machine. Signed-off-by: Daniel Stone --- tests/sanity-test.c | 4

[PATCH wayland 2/6] scanner: Mark fail() as noreturn

2018-08-28 Thread Daniel Stone
Help static analysers by letting them know that once we fail(), execution will terminally complete. Signed-off-by: Daniel Stone --- src/scanner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scanner.c b/src/scanner.c index 3afc3d3d..084f196d 100644 --- a/src/scanner.c

[PATCH wayland 3/6] scanner: Reverse expat/libxml include order

2018-08-28 Thread Daniel Stone
libxml2 unconditonally defines XMLCALL to nothing. Expat does not redefine XMLCALL if it is already defined, but if it is not, and we are building with gcc on i386 (not x86-64), it will define it as 'cdecl'. Including Expat before libxml thus results in a warning about XMLCALL being redefined. Luc

[PATCH wayland 6/6] tests: Remove memory leak checking infrastructure

2018-08-28 Thread Daniel Stone
There are far better ways to detect memory leaks, such as either valgrind or ASan. Having Meson makes it really easy to use these tools in our tests, and we can do that in CI as well. Having these local wrappers actually completely broke ASan usage, so remove them in favour of using the more power

[PATCH wayland 0/6] Minor test/scanner fixes

2018-08-28 Thread Daniel Stone
Hi, These first 5 patches fix some issues I found by running the test suite under an expanded set of toolchains, including the ASan address sanitiser and Clang's static analyser. Patch 6 removes the leak checking from the test suite completely. Previously due to toolchain immaturity, it was really

Re: [PATCH wayland v4 3/5] Add Meson build to Wayland

2018-08-28 Thread Daniel Stone
Hi, On Tue, 28 Aug 2018 at 23:19, Daniel Stone wrote: > Meson is a next generation build system, simpler than Autotools and, > more importantly, faster and more portable. While the latter > consideration is of lesser importance for Wayland, being easier to > understand and faster are pretty much

[PATCH wayland v4 3/5] Add Meson build to Wayland

2018-08-28 Thread Daniel Stone
From: Emmanuele Bassi Meson is a next generation build system, simpler than Autotools and, more importantly, faster and more portable. While the latter consideration is of lesser importance for Wayland, being easier to understand and faster are pretty much key reasons to switch. This is mostly a

[PATCH wayland v4 5/5] meson: Generate man pages

2018-08-28 Thread Daniel Stone
From: Emmanuele Bassi There are ancillary man pages not built by Doxygen that we need to generate an install. --- doc/man/meson.build | 64 + doc/meson.build | 1 + 2 files changed, 65 insertions(+) create mode 100644 doc/man/meson.build diff --

[PATCH wayland v4 1/5] build/doc: Ensure destination dir exists despite VPATH

2018-08-28 Thread Daniel Stone
Make considers a variable called VPATH when trying to satisfy dependencies, e.g. for a target 'foo', it will consider the target extant if VPATH is '../../bar' and '../../bar/foo' exists. Part of the doc build, the '$(alldirs)' target, exists to create the target directories if they do not exist.

[PATCH wayland v4 4/5] meson: Run Doxygen on the Meson build

2018-08-28 Thread Daniel Stone
From: Emmanuele Bassi Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Reviewed-by: Daniel St

[PATCH wayland v4 2/5] Support running tests from different build directories

2018-08-28 Thread Daniel Stone
From: Emmanuele Bassi The tests that run exec-fd-leak-checker expect the binary to be located in the current directory. This is not always the case; for instance, the binaries could be built under `tests`, but be invoked under the top-level build directory. We can use an environment variable to

Re: [PATCH weston v5 03/14] libweston: add weston_debug API and implementation

2018-08-28 Thread Pekka Paalanen
On Mon, 27 Aug 2018 16:20:41 +0100 Daniel Stone wrote: > Hi Pekka, > > On Fri, 24 Aug 2018 at 09:12, Pekka Paalanen wrote: > > On another matter, I've been wondering if storing the debug scopes in > > weston_compositor is a good thing. We have the logger initialized > > earlier, and quite a lot

Re: [PATCH weston v5 03/14] libweston: add weston_debug API and implementation

2018-08-28 Thread Pekka Paalanen
On Mon, 27 Aug 2018 16:15:23 +0100 Daniel Stone wrote: > Hi Pekka, > > On Mon, 6 Aug 2018 at 14:05, Pekka Paalanen wrote: > > On Fri, 20 Jul 2018 20:03:24 +0100 Daniel Stone > > wrote: > > > + while (len_ > 0) { > > > + ret = write(stream->fd, data, len_); > > > +

Re: Question regarding moving weston_output_from_resource to weston_head_from_resource

2018-08-28 Thread Pekka Paalanen
On Tue, 28 Aug 2018 08:46:51 -0400 Sichem Zhou wrote: > Hi all, > > Yesterday I just updated my compositor from `libweston-4` to `libweston-5`. > Great job on the new weston_head API. I've noticed the changes mapping > `wl_output` to `weston_head` that I hope to pose a question on that: > > Sin

Question regarding moving weston_output_from_resource to weston_head_from_resource

2018-08-28 Thread Sichem Zhou
Hi all, Yesterday I just updated my compositor from `libweston-4` to `libweston-5`. Great job on the new weston_head API. I've noticed the changes mapping `wl_output` to `weston_head` that I hope to pose a question on that: Since the `weston_output` represents a logical device and `weston_head` i

egl image creation in case of atomic

2018-08-28 Thread Hosokawa, Kenji (ADITG/ESB)
Hi, When eglSwapInterval is 0, clients may send buffers without waiting frame callbacks. Currently, egl image is created when a buffer is committed from client. But egl image is only needed, when gl-renderer is used to render the framebuffer. Creating an egl image in every commit causes additio

Re: I've got a question to ask you

2018-08-28 Thread binnan hao
Thanks Pekka Paalanen 于2018年8月28日周二 下午3:44写道: > On Tue, 28 Aug 2018 12:00:56 +0800 > binnan hao wrote: > > > I'm using Busybox root file system, and the default setting on Busybox is > > mdev instead of udev. > > Hi, > > whatever you have or do, you need to set up the device attributes the > wa

Re: I've got a question to ask you

2018-08-28 Thread Pekka Paalanen
On Tue, 28 Aug 2018 12:00:56 +0800 binnan hao wrote: > I'm using Busybox root file system, and the default setting on Busybox is > mdev instead of udev. Hi, whatever you have or do, you need to set up the device attributes the way libinput expects them to be to recognize an input device as a ke