tests: Fix seg fault when gem_mmap is run without specifying a subtest
authorMike Mason <michael.w.mason@intel.com>
Mon, 18 Aug 2014 17:43:49 +0000 (10:43 -0700)
committerThomas Wood <thomas.wood@intel.com>
Tue, 19 Aug 2014 10:32:06 +0000 (11:32 +0100)
commit4d2f511cee49db9b8f1ebf93b9835d871dfb9a9e
tree95a4af1122c274dd9492a2cacbd2e3747db1b199
parente9da093b13c572b50c84ea2ec19244c8e2b78f08
tests: Fix seg fault when gem_mmap is run without specifying a subtest

gem_mmap seg faults when all tests are run together. This occurs because
the new-object subtest closes the gem object, but short-mmap assumes
it still exists. Thus gem_mmap__cpu() returns nil for addr and memset()
seg faults. This patch makes new-object and short-mmap create and
close their own gem objects.

Signed-off-by: Mike Mason <michael.w.mason@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
tests/gem_mmap.c