test: add fence-image-self-test
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 7 May 2015 14:16:05 +0000 (17:16 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 3 Sep 2015 11:00:32 +0000 (14:00 +0300)
commit07006853828a59b5e0cd7d7d058d03db4e23e6ec
treee28907c364cf8794691221592d708951e2fb83d5
parent13d93aa12050ce99643d56b0c730404294f46c2f
test: add fence-image-self-test

Tests that fence_malloc and fence_image_create_bits actually work: that
out-of-bounds and out-of-row (unused stride area) accesses trigger
SIGSEGV.

If fence_malloc is a dummy (FENCE_MALLOC_ACTIVE not defined), this test
is skipped.

Changes in v2:

- check FENCE_MALLOC_ACTIVE value, not whether it is defined
- test that reading bytes near the fence pages does not cause a
  segmentation fault

Changes in v3:

- Do not print progress messages unless VERBOSE environment variable is
  set. Avoid spamming the terminal output of 'make check' on some
  versions of autotools.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Ben Avison <bavison@riscosopen.org>
test/Makefile.sources
test/fence-image-self-test.c [new file with mode: 0644]