Daniel Vetter [Thu, 15 Aug 2013 09:55:32 +0000 (11:55 +0200)]
lib/drmtest: Use igt_assert in the do_ioctl/do_or_die helpers
abort results in "crash" test results in the piglit runner, igt gives
us neater output.
The downside is that we can now only use these in igt tests, but
that's already the case (and given their placement in drmtest.h their
intended use-case, too).
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 15 Aug 2013 11:47:15 +0000 (13:47 +0200)]
tests/gem_ctx_basic: Use igt_require
... instead of threading the 77 return value through threads. Even
better would be to check for requirements in the single-threaded setup
part of the test, since now it's done by multiple threads in parallel
and will result in interleaved and multiplied output on stdout.
Whatever.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Chris Wilson [Thu, 15 Aug 2013 09:55:22 +0000 (10:55 +0100)]
Add intel_framebuffer_dump
A simple utility to capture the currently active framebuffers and record
them as a png.
Daniel Vetter [Wed, 14 Aug 2013 20:13:38 +0000 (22:13 +0200)]
lib/drmtest: fix subtest output when skipping all tests
(null) isn't too nice ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 20:24:43 +0000 (22:24 +0200)]
tests/prime_nv_api: fixup conversion goof-up
Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 20:15:04 +0000 (22:15 +0200)]
tests/primve_nv_test: use igt_assert for checking
... and drop the int return argument of the tests.
Also:
- make nv_write_i915_cpu_mmap_read functional again by dropping the
goto.
- add checks to i915_import_pread_pwrite
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 16:30:03 +0000 (18:30 +0200)]
lib/drmtest: documentation for igt_fixture
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 16:03:09 +0000 (18:03 +0200)]
lib/drmtest: add igt_subtest_name and use it in kms_flip
Useful when the testname is constructed with igt_subtest_f.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 16:02:46 +0000 (18:02 +0200)]
tests: roll out igt_fixture
Also sprinkle igt_assert and igt_require over the setup code to clean
up code while at it. To avoid gcc getting upset about unitialized
variables just move them out of main as global data (where they always
get initialized to 0) - gcc can't see through our igt_fixture and
igt_subtest maze properly.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 15:11:49 +0000 (17:11 +0200)]
tests/gem_ctx_bad_exec: add subtest for vebox
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 13:48:54 +0000 (15:48 +0200)]
tests: Introduce igt_fixture
Just a tiny wrapper to protect global test setup/teardown code when
just listing subtests. Rolling this out over all tests with subtests
should allow us to generate the testlist with piglit as an
unpriviledged user on a non-intel system.
The aim here is to make our QA team happy who currently suffers from
this. Even more so for the prime tests since you need a system with
intel _and_ nouveau gpus to just be able to list tests.
Exemplary conversion with gem_concurrent_blt.c
Fixture is the same name other test suites like googletest use for
setup/teardown code used by multiple tests.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 14:51:26 +0000 (16:51 +0200)]
lib/drmtest: sprinkle documentation over igt_skip|fail|success|exit
And make the behaviour of igt_exit() a bit saner.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 14:02:24 +0000 (16:02 +0200)]
tests: use igt_exit() consistently with subtests
This is mostly important to get the SKIP reporting right, but I've
found a few stragglers that wanted to get converted over to the igt
result reporting completely.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 13:18:37 +0000 (15:18 +0200)]
tests/gem_concurrent_blt: extract run wrappers
Functional programming ftw!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 13:10:52 +0000 (15:10 +0200)]
tests/gem_concurrent_blt: use the test helpers in the forked tests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 13:08:05 +0000 (15:08 +0200)]
tests/gem_concurrent_blt: refactor basic run modes a bit
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 12:50:50 +0000 (14:50 +0200)]
tests: merge gem_*_concurrent_blt together
Too much copy&pasting isn't good.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 11:48:10 +0000 (13:48 +0200)]
lib/drmtest: Don't spoil stdout when listing tests
Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 11:47:47 +0000 (13:47 +0200)]
tests: add igt_subtest_f for snprintf'ing testnames
Useful when stitching together combinatorial testnames.
v2:
- ## rules are just fun. We need 2 indirections to actually get
__LINE__ to properly expand.
- Kill stray ; which botched the logic.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 10:13:28 +0000 (12:13 +0200)]
tests/gem_dummy_reloc_loop: use igt_skip
For tests with subtest we should use igt_skip to ensure that subtests
are always properly enumerated.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 14 Aug 2013 10:07:44 +0000 (12:07 +0200)]
tests/gem_write_read_ring_switch: use igt_exit and friends
And consolidate the gem_require_ring check a bit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Chris Wilson [Wed, 14 Aug 2013 10:03:34 +0000 (11:03 +0100)]
gem_(cpu|prw)_concurrent_blit: Add contending processes
Blindly fixed conflicts:
tests/gem_cpu_concurrent_blit.c
tests/gem_prw_concurrent_blit.c
Chris Wilson [Wed, 14 Aug 2013 07:17:22 +0000 (08:17 +0100)]
gem_write_read_ring_switch: Copy the missing igt_require
An oversight in the mass conversion to the new framework as the test was
called from two locations.
Ideally, the checks could be moved back to the caller and the framework
still work. This is just the patch of least resistence.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68091
Chris Wilson [Tue, 13 Aug 2013 22:51:09 +0000 (23:51 +0100)]
gem_exec_lut_handle: Use linear regression analysis
Simultaneously make the results more robust and compact by performing a
linear regression to compute the amount of time required to perform the
exec array walk and the relocations.
Daniel Vetter [Tue, 13 Aug 2013 21:05:51 +0000 (23:05 +0200)]
lib/drmtest: Don't run the rude interruptor when just listing subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 18:07:32 +0000 (20:07 +0200)]
configure: require libdrm 2.4.45
We've started to use the VEBOX defines.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 11:20:58 +0000 (13:20 +0200)]
tests: introduce igt_require
Since igt_skip has funny control flow we can abuse it and make it work
like a special kind of assert which automatically skips tests if a
requirement fails.
Note that in places where we have a less strict test which should
always succeed (e.g. ioctl works or isn't available) the igt_assert
should be place before the igt_require with the more strict
requirements. Otherwise we'll skip a test instead of properly failing
it.
Convert a few users of igt_skip over to igt_require to showcase its
use.
v2: s/gem_check_/gem_require_/ so that we consistently use "require"
to indicate magic check that can call igt_skip. Imo hiding the
igt_require for feature checks is ok, but for more traditional assert
like use cases an explicit igt_require might be better.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 10:56:06 +0000 (12:56 +0200)]
tests: use igt_fail instead of exit(param != 0)
Mostly a sed job with too manual fixups:
- one case of using _exit instead of exit
- and one case which under some conditions use 77, so convert that
check to an igt_skip.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 10:51:35 +0000 (12:51 +0200)]
tests: s/exit(77)/igt_skip()/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 10:50:39 +0000 (12:50 +0200)]
tests: s/exit(EXIT_SUCCESS)/igt_success()/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 10:49:46 +0000 (12:49 +0200)]
tests: s/exit(EXIT_FAILURE)/igt_fail(1)/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 10:45:14 +0000 (12:45 +0200)]
tests/gem_readwrite: convert to subtests
A bit lazy since the read/write tests are all smashed together. But
since we have really evil partial write/read tests for coherency
checking that doesn't matter that much really.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 10:41:20 +0000 (12:41 +0200)]
tests/gem_ctx_bad_exec: convert to subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 10:35:58 +0000 (12:35 +0200)]
tests: s/assert/igt_assert
Just a wholesale rollout for now, we can refine later on.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 09:56:24 +0000 (11:56 +0200)]
lib/drmtest: roll out igt_assert
I've left the asserts as-is where they check for tests that use the
infrastructure in drmtest.c incorrectly. That way piglit's
differentiation between a failed testcase and a crashing testcase
should be more useful.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 09:52:01 +0000 (11:52 +0200)]
lib/drmtest: add igt_assert as a replacement for assert
The aim is that we keep on running subtests even when a not-too-lethal
assert failed in a subtest. To make that useful also print per-subtest
test results from igt_skip|fail|success functions.
If required we can always go googletest-nuts with different types of
asserts later on, but I think for now we're good with what we have
here.
v2: Also print out proper SKIP message when skipping all subsequent
tests since a global (i.e. outside of a subtest) init step failed and
resulted in an igt_skip call.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 13 Aug 2013 09:40:57 +0000 (11:40 +0200)]
lib/drmtest: fixup igt_fail for the list-only case
Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 8 Aug 2013 07:32:05 +0000 (09:32 +0200)]
tests: add drm_get_client_auth
To check we don't break the magic authentication check libva does.
Ugh.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 12:02:03 +0000 (14:02 +0200)]
tests: scrap old automake based kernel test runner
Upstream broke our dynamic creation of the testlist, and I think
adding stupid .tests suffixes everywhere just to appease upstream
autohell tools isn't that great. So scrap it, we can use piglit
instead.
References: https://lists.gnu.org/archive/html/help-debbugs/2013-06/msg00000.html
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 10:26:35 +0000 (12:26 +0200)]
tests: s/return igt_retval();/igt_exit();/
Requested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 10:17:35 +0000 (12:17 +0200)]
s/drmtest_/igt_/
Requested-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 10:15:16 +0000 (12:15 +0200)]
s/drmtest_subtest_block/drmtest_subtest/
The _block postfix meant to convey that a C statement/block must
follow can be misread as the verb to block. So drop it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 09:57:32 +0000 (11:57 +0200)]
lib/drmtest: __ prefix for drmtest_run_subtest
Now that callers must setup the longjmp target (we can't do that in
run_subtest itself since that callframe won't survive) tests shouldn't
call this function directly any more.
Make this clear by adding a __ prefix.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 08:46:55 +0000 (10:46 +0200)]
lib/intel_mmio: Remove unused label
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 09:03:29 +0000 (11:03 +0200)]
tests: use drmtest_skip to check for rings
To simplify things add a set of gem_check_<ring> functions which take
care of this. Since I've opted for static inlines drmtest.h grew a few
more header includes which was a neat opportunity to dump a few redundant
#defines.
This kills all the skipped_all hand-rolled logic we have.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 08:43:59 +0000 (10:43 +0200)]
tests: use drmtest_skip() in caching ioctl helpers
This way we can rip out all the skip handling from the test control flow,
and additionally (by using drmtest_retval()) even get correct exit codes.
The only tricky part is that when we only want ot skip parts of a test
(like for gem_pread and gem_pwrite) we need to split out those parts as
subtests. But no addition of control-flow is required, the set/longjmp
magic in the helpers all makes it happen.
Also we make extensive use of the behaviour of drmtest_skip to skip
all subsequent subtests if it is called outside of a subtest. This allows
us to re-flatten the control flow a lot.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 08:39:33 +0000 (10:39 +0200)]
lib/drmtest: make signal process cleanup more robust
If we skip a test and and fail somewhere the parent might die before the
child. So add some cleanup to handle this case. Also make sure that the
parent indeed waits for the child to die.
This is required to make the latest version of the piglit runner happy,
it tends to wait for all zombies to disappear.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 07:49:25 +0000 (09:49 +0200)]
tests/gem_caching: convert to use drmtest retval infrastructure
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 07:31:55 +0000 (09:31 +0200)]
lib/drmtest: skip/fail handling
Exitcode handling in igt testcases has too ugly facets in combination
with subtests:
- When individual subtest needed to be skipped for different reasons
we need to painstakingly thread this information through the test to
make sure that we still succeed if just one testcase worked (for
running it with the simple automake test runner in igt). But it also
needs to correctly report the skip exit value if only this one
skipped testcase has been run (e.g. when run with piglit or in QA's
test infrastructure).
- We'd prefer to easily skip (and also fail) subtests without
hampering other subtests. Again threading the return value of each
subtest through the code is cumbersome.
To simplify test case writing use longjmps to be able to get out of
subcases easily. But since longjmps are funny things thug it all away
into the newly added drmtest_subtest_block macro.
Note that if drmtest_skip is called outside of a subtest, but in a
testcase with subtests all subsequent subtests will be automatically
skipped.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 07:04:24 +0000 (09:04 +0200)]
lib/drmtest: Add drmtest_subtest_block macro
Doesn't do more than an if (drmtest_run_test(name)) right now, but
as soon as we get a bit of infrastructure to handle test failures and
skipping, this will get more interesting.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 12 Aug 2013 06:41:05 +0000 (08:41 +0200)]
tests: s/cacheing/caching
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Chris Wilson [Mon, 12 Aug 2013 07:39:26 +0000 (08:39 +0100)]
gem_pwrite: Print the cache name not the number
Bugzilla: https://bugzilla.freedesktop.org/show_bug.cgi?id=68003
Chris Wilson [Sat, 10 Aug 2013 14:49:33 +0000 (15:49 +0100)]
Expand gem_set_cacheing testing to handle the proposed DISPLAY domain
Chris Wilson [Wed, 7 Aug 2013 22:41:54 +0000 (23:41 +0100)]
intel_error_decode: First try /sys/drm/card0/error for the error-state
As the sysfs is almost always mounted and readable, we have a higher
success rate checking for our error state there than in debugfs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Daniel Vetter [Wed, 7 Aug 2013 12:54:00 +0000 (14:54 +0200)]
tests/prime_self_import: fix comment
Daniel Vetter [Wed, 7 Aug 2013 16:36:31 +0000 (18:36 +0200)]
tests/prime_self_import: Fixup previuos test
... not a great display of my prowess here.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 7 Aug 2013 16:12:20 +0000 (18:12 +0200)]
tests/prime_self_import: Add a flink/dma-buf self-import test
This checks that we really always fill the dma-buf export cache. Which
sometimes we don't.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 7 Aug 2013 10:01:35 +0000 (12:01 +0200)]
tests: update .gitignore
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 7 Aug 2013 09:59:05 +0000 (11:59 +0200)]
tests/gem_pwrite_pread: subtest annotation
This testcase mixes correctnes tests with performance tests, so it's
good to track the different correctness test separate for QA.
Together with pread_after_blt the pwrite->blt tests here exercise the
full cache coherency lifecycle of both snooped and uncached objects.
/me is happy
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 6 Aug 2013 20:27:37 +0000 (22:27 +0200)]
tests: add gem_prw_concurrent_blt
New testcase to check that pwrite/pread correctly synchronize with
oustanding rendering. Just to catch regressions when we change
something.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 25 Jul 2013 19:09:43 +0000 (21:09 +0200)]
tests/prime_self_import: Add racing handle2fd testcase
Similar to how we test flink races. Note that on unfixed kernels this
oopses, and with my current set of patches it still leaks like mad.
v2: Only close the prime fd if we've successfully created it.
v3: Add a reimport test to check whether we don't race when reaping
the obj->dma_buf link.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 25 Jul 2013 20:10:51 +0000 (22:10 +0200)]
tests/gem_flink_race: Kill duplicate drm_open_any
Leak test that leaks ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Chris Wilson [Tue, 6 Aug 2013 17:03:18 +0000 (18:03 +0100)]
gem_pwrite_pread: Use mmap to bypass pwrite/pread for comparison
Just to help sanity test alternate paths.
Chris Wilson [Tue, 6 Aug 2013 15:14:59 +0000 (16:14 +0100)]
gem_pwrite_pread: Measure how long it takes to upload/copy/download
Further trying to determine the effects of setting snooping.
Chris Wilson [Tue, 6 Aug 2013 14:48:08 +0000 (15:48 +0100)]
lib: Reset sig_stat after stopping the rude interrupter
Chris Wilson [Tue, 6 Aug 2013 14:18:30 +0000 (15:18 +0100)]
gem_pread: Symmetric measurement to gem_pwrite
Chris Wilson [Tue, 6 Aug 2013 14:12:55 +0000 (15:12 +0100)]
gem_pwrite: Time pwrites to both uncached/snooped memory
Chris Wilson [Tue, 6 Aug 2013 14:09:50 +0000 (15:09 +0100)]
gem_partial_pwrite_pread: Exercise different cacheing of the staging bo
Chris Wilson [Tue, 6 Aug 2013 14:03:40 +0000 (15:03 +0100)]
gem_pread_after_blit: Exercise reading back through different cache levels
Imre Deak [Mon, 29 Jul 2013 14:21:21 +0000 (17:21 +0300)]
kms_render: fix gpu-blit for non-32bit bpps
intel_copy_bo assumes a 32bpp bo, whereas we passed it bos with
arbitrary bpp values. This resulted in thrashing GPU memory following the
destination bo.
Fix this by using a blit helper that can handle other bpps too.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Imre Deak [Mon, 29 Jul 2013 14:19:58 +0000 (17:19 +0300)]
lib: export drm_format_to_bpp
Needed by the next patch.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Imre Deak [Mon, 29 Jul 2013 13:43:31 +0000 (16:43 +0300)]
intel_batchbuffer: add support for non-32bit blt copies
Needed by an upcoming patch fixing kms_render's blits for fbs that have
other than 32bpp formats.
Based on the corresponding SNA function.
v2:
- fix random ordering of src, dst parameters (Chris)
- pass pitch in bytes rather than pixels (Chris)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Ben Widawsky [Sat, 27 Jul 2013 22:30:41 +0000 (15:30 -0700)]
lib/intel_mmio: Fix the fixed fix (register access)
When I moved code around here:
commit
57bc7631e161a7bdcf7f68e1a46049dcb49c2256
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Thu May 23 11:09:55 2013 -0700
lib/intel_mmio: Fix the fix
I accidently dropped the intel_gen() for the PCI id.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67289
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Daniel Vetter [Thu, 25 Jul 2013 19:51:27 +0000 (21:51 +0200)]
tests/sysfs_edid_timing: use real bash
The lib/drm_lib.sh load path trick doesn't work otherwise. Tsk.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 24 Jul 2013 15:04:35 +0000 (17:04 +0200)]
tests/gem_flink_race: correct thread count
They all race against each another, no worker-slave relationship
like in the other subtest.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 24 Jul 2013 15:01:11 +0000 (17:01 +0200)]
tests/gem_flink_race: fix up scanf format
Oops, failed to git add.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 24 Jul 2013 07:46:57 +0000 (09:46 +0200)]
tests/gem_flink_race: actually make it somewhat useful
- Enable subtest support.
- Add a check for the same flink name in the racing threads, which is
an issue one of my recent patches actually fixes.
- Add the test I've actually wanted to write which races an flink
against gem close (with no open in between). That one does indeed
leak.
- Readd the leak check, but note that this needs a fixed kernel.
Otherwise the leak counter will be utter garbage.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 24 Jul 2013 07:31:40 +0000 (09:31 +0200)]
Revert "tests/gem_flink_race: count leaked objects"
This reverts commit
bd927662fcfb1443c5982fb04cc694f78e1c8d53.
It's bogus.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 24 Jul 2013 06:01:35 +0000 (08:01 +0200)]
tests/gem_flink_race: check for expected flink failure code
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 24 Jul 2013 05:37:45 +0000 (07:37 +0200)]
tests/gem_flink_race: count leaked objects
And fail the test if the leak count is bigger than 0.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 24 Jul 2013 04:55:10 +0000 (06:55 +0200)]
tests/gem_flink_race: kill debug printf
Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 23 Jul 2013 21:14:57 +0000 (23:14 +0200)]
tests: add gem_flink_race
This exercises a race in the flink name descruction of the current drm
gem core. When racing a gem close with a gem open the open can sneak
in and cause the kernel to leak the flink name and its reference.
This results in leaked gem objects that won't get reaped even at drm
file close time. On my 2 core/4 threads snb machine this leaks on the
order of 1k objects per second.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 23 Jul 2013 20:43:30 +0000 (22:43 +0200)]
lib/drmtest: add gem_flink and gem_open
Requires us to rename a few things in the gem_flink test to avoid
variable shadowing.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 23 Jul 2013 19:07:16 +0000 (21:07 +0200)]
tests: sort tests in Makefile.am and .gitignore
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 22 Jul 2013 07:24:43 +0000 (09:24 +0200)]
tests/gem_suspend: exercise fence restore code
This exercise the bug fixed in
commit
94a335dba34ff47cad3d6d0c29b452d43a1be3c8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed Jul 17 14:51:28 2013 +0200
drm/i915: correctly restore fences with objects attached
For fun I've also added a subtest for the inverse transition.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 19 Jul 2013 17:08:43 +0000 (19:08 +0200)]
lib/drmtest: document interface groups with one-liners
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ben Widawsky [Thu, 11 Jul 2013 16:59:46 +0000 (09:59 -0700)]
tests: Basic tools tester
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Chris Wilson [Sat, 20 Jul 2013 09:20:52 +0000 (10:20 +0100)]
test/gem_pread_after_blit: Make the test a little more stressful
Extend the simply functionality by repeating it under the rude
interrupter and chain together a couple of steps in new test cases.
As a compromise for adding more tests, incorporate the piglit subtest
framework.
Damien Lespiau [Fri, 19 Jul 2013 16:01:55 +0000 (17:01 +0100)]
tests: Source drm_lib.sh instead of having its own INTEL_SIMULATION test
One code path to maintain is always better.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Fri, 19 Jul 2013 16:08:57 +0000 (17:08 +0100)]
tests: Allow a shell test to declare it doesn't need to be DRM master
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Fri, 19 Jul 2013 14:42:20 +0000 (15:42 +0100)]
lib: Allow users of env_set() to specify a default value
So when the environment value isn't set, one can specify the default
value to return.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Fri, 19 Jul 2013 15:08:11 +0000 (16:08 +0100)]
build: Pimp up the configure summary
This helps people compiling i-g-t figuring out what can be optional.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Fri, 19 Jul 2013 15:07:18 +0000 (16:07 +0100)]
build: Fix automake 1.13 warnings
warning: deprecated feature: target 'sr' overrides 'sr$(EXEEXT)'
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Fri, 19 Jul 2013 15:03:49 +0000 (16:03 +0100)]
build: Fix unbalanced quoting in the python dumper AC_ARG_ENABLE()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Fri, 19 Jul 2013 15:03:29 +0000 (16:03 +0100)]
build: Fix a small typo in configure.ac
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Daniel Vetter [Fri, 19 Jul 2013 16:24:59 +0000 (18:24 +0200)]
lib/drmtest: fix const mismatch warning
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Xiong Zhang [Fri, 19 Jul 2013 10:42:52 +0000 (18:42 +0800)]
tests: add reloc, pread, pwrite slow path subtest
the reloc, pread, pwrite slow path will be prevented by prefault,
these subtests will disable prefault first, then do reloc, pread,
pwrite, finally enable prefault.
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Xiong Zhang [Fri, 19 Jul 2013 10:42:51 +0000 (18:42 +0800)]
lib/drmtest: add drmtest_disable/enable_prefault() function
V2: add exit handler to enable prefault (Daniel)
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Damien Lespiau [Thu, 18 Jul 2013 11:23:49 +0000 (12:23 +0100)]
tests: Add some tiled tests to the runs on simulation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Thu, 18 Jul 2013 10:53:55 +0000 (11:53 +0100)]
tests: Instrument gem_seqno_wrap to run in simulation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>