Re: [PATCH wayland v2 4/4] array-test: Include wayland-util.h and simplify init test

2016-10-18 Thread Yong Bakos
On Oct 18, 2016, at 2:05 AM, Pekka Paalanen wrote: > > On Tue, 27 Sep 2016 23:27:00 +0200 > Dima Ryazanov wrote: > >> I think I actually know the point of the test. >> >> It tries to verify that size, alloc, and data were initialized to 0, rather >> than

Re: [PATCH wayland v2 4/4] array-test: Include wayland-util.h and simplify init test

2016-10-18 Thread Pekka Paalanen
On Tue, 27 Sep 2016 23:27:00 +0200 Dima Ryazanov wrote: > I think I actually know the point of the test. > > It tries to verify that size, alloc, and data were initialized to 0, rather > than left uninitialized - but the difficulty is that uninitialized memory > is often already

Re: [PATCH wayland v2 4/4] array-test: Include wayland-util.h and simplify init test

2016-09-27 Thread Dima Ryazanov
I think I actually know the point of the test. It tries to verify that size, alloc, and data were initialized to 0, rather than left uninitialized - but the difficulty is that uninitialized memory is often already filled with 0s. So the test repeats the process a whole bunch of times, hoping to

[PATCH wayland v2 4/4] array-test: Include wayland-util.h and simplify init test

2016-09-27 Thread Yong Bakos
From: Yong Bakos Include wayland-util.h in addition to wayland-private.h, to be more explicit about where wl_array is defined. Remove the useless repeated testing of wl_array_init, because if it fails once out of thousands of iterations we're all doomed anyway.