[PATCH v3 0/3] Tests for verifying the old and extended GEM_CREATE ioctl

ankitprasad.r.sharma
2015-07-22T14:02:32Z

This new set of tests verifies the old and the new extended GEM_CREATE ioctl
gem_stolen tries to verify the new extended GEM_CREATE ioctl, which tries to
create an object backed by stolen memory and performs basic operations on it.
It verifies the creation as well as the purging of an object when it is no
longer needed, copying contents of a stolen backed object to another, doing
a pread/pwrite on the object and verifying its contents.

We also try to pread/pwrite a stolen backed object multiple times to get the
pread/pwrite speed, as well as pread speed when there is a page fault while
accessing userspace buffer.

There is a new test gem_create to do a sanity check for creating both
stolen/shmem backed objects with valid and invalid parameters.

v2: Rebased to the latest and added IGT_TEST_DESCRIPTION

v3: Addressed comments by Tvrtko and Dave, added one more testcase for verifying
extended gem_create ioctl

Ankitprasad Sharma (3):
igt/gem_stolen: Verifying extended gem_create ioctl
igt/gem_pread: Support to verify pread/pwrite for non-shmem backed obj
igt/gem_create: Test to validate parameters for GEM_CREATE ioctl

lib/ioctl_wrappers.c | 74 ++++++++++
lib/ioctl_wrappers.h | 13 ++
tests/Makefile.sources | 2 +
tests/gem_create.c | 170 +++++++++++++++++++++++
tests/gem_pread.c | 106 ++++++++++++++-
tests/gem_pwrite.c | 54 +++++++-
tests/gem_stolen.c | 363 +++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 771 insertions(+), 11 deletions(-)
create mode 100644 tests/gem_create.c
create mode 100644 tests/gem_stolen.c