10 Commits

Author SHA1 Message Date
Thomas Wood
6c89204da7 lib: add igt_debugfs_search
Add igt_debugfs_search to search each line in a debugfs file for a
specified substring.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-24 14:24:18 +01:00
Tvrtko Ursulin
1ea96af776 gem_ppgtt: Test VMA leak on context destruction
Test that VMAs associated with a context are cleaned up when
contexts are destroyed.

In practice this emulates the leak seen between fbcon and X server.
Every time the X server exits we gain one VMA on the fbcon frame
buffer object as externally visible via for example
/sys/kernel/debug/dri/0/i915_gem_gtt.

v2: Use igt_debugfs_open, getline and strstr instead of home-brewed
string matching. (Thomas Wood)

v3: Rebase for drm_open_driver.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-24 14:24:18 +01:00
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
Apply the new API to all call sites within the test suite using the following
semantic patch:

// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)

@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Thomas Wood
804e11f40d lib: add a single include header
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 09:37:10 +01:00
Daniele Ceraolo Spurio
159562c825 tests/gem_ppgtt: Check for vm leaks with flink and ppgtt
Using imported objects should not leak i915 vmas (and vms).

In practice this simulates Xorg importing fbcon and leaking (or not) one vma
per Xorg startup cycle.

v2: use low-level ioctl wrappers and bo offset to check the leak (Chris)
v3: use the flinked bo as batch (Chris)
v4: add check on offset, remove unneeded  assignments (Chris)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> (v2+)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-05-07 08:43:32 +02:00
Daniel Vetter
3e9b4e37e6 tests: Align subtest with naming convention
Yeah, historically grown but we should try to be somewhat consistent.
It helps with filtering testcases.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13 09:35:36 +01:00
Daniel Vetter
bf5035a728 tests/gem_ppgtt: Start rcs before bcs for context tests
This way the igt_require for the ctx support is hit before we've
launched a bazillion threads and need to wait until they're all done.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13 09:35:36 +01:00
Daniel Vetter
4306538d1d tests: Sprinkle missing igt_exit() where needed.
Yay for breaking piles of tests.

This regression has been introduced with

commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce
Author: Tim Gore <tim.gore@intel.com>
Date:   Wed Oct 1 13:25:20 2014 +0100

    lib/igt_core.c: disable lowmemorykiller during tests

Cc: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-02 11:34:55 +02:00
Chris Wilson
107151ce9f igt/gem_ppgtt: Create secondary contexts and mm
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09 16:28:36 +01:00
Chris Wilson
961578f471 test: Exercise full ppgtt switching between multiple fd
Load up both rings with lots of fighting between multiple contexts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09 14:52:35 +01:00