[Pixman] [RFC PATCH 0/3] Add fence_image_create_bits() test helper

Pekka Paalanen ppaalanen at gmail.com
Fri May 8 05:45:34 PDT 2015


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Hi,

this is in reply to
http://lists.freedesktop.org/archives/pixman/2014-October/003457.html
item 37 (the last one).

	"I think it would be worthwhile to have a test that uses fence_malloc
	for the source buffer and the matrix mentioned in the commit. In fact,
	the fence_malloc() testing could benefit from being extended in
	various ways:

	      - having fence pages both before and after the image
	      - having fence pages in the 'stride' part of the image"

These patches add fence_image_create_bits() that builds on fence_malloc(). To
make sure it actually will catch out-of-bounds accesses, the last patch adds a
self-test.

The self-test uses the following new things that have not been used in Pixman
code base before:
	- fork()
	- waitpid()
	- sys/wait.h

Should I be adding tests in configure.ac for these?

Ben, I think you know better what the actual tests for "More accurate
COVER_CLIP_NEAREST|BILINEAR" should look like. I hope this implements the fence
part properly. Would you like to write the out-of-bounds tests or explain me
what they should do?


Pekka Paalanen (3):
  utils.[ch]: add FENCE_MALLOC_ACTIVE
  utils.[ch]: add fence_image_create_bits ()
  test: add fence-image-self-test

 test/Makefile.sources        |   1 +
 test/fence-image-self-test.c | 198 +++++++++++++++++++++++++++++++++++++++++++
 test/utils.c                 | 106 ++++++++++++++++++++++-
 test/utils.h                 |  14 +++
 4 files changed, 316 insertions(+), 3 deletions(-)
 create mode 100644 test/fence-image-self-test.c

-- 
2.3.6

Thanks,
pq



More information about the Pixman mailing list