summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-03-19lib/igt_aux: Divert ioctls for signal injectionChris Wilson
To simplify and speed up running interruptible tests, use a custom ioctl() function that control the signaling and detect when we need no more iterations to trigger an interruption. We use a realtime timer to inject the signal after a certain delay, increasing the delay on every loop to try and exercise different code paths within the function. The first delay is very short such that we hopefully enter the kernel with a pending signal. Clients should use struct igt_sigiter iter = {}; while (igt_sigiter_repeat(&iter, enable_interrupts=true)) do_test() to automatically repeat the test until we can inject no more signals into the ioctls. This is condensed into a macro igt_interruptible(enable_interrupts=true) do_test(); for convenience. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19tests/gem_concurrent_blt|all: Use igt_subtest_groupDaniel Vetter
Looks tidy again, and doesn't break igt assumptions. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-03-18prime_mmap_coherency: Add return error tests for prime sync ioctlTiago Vignatti
This patch adds ioctl-errors subtest to be used for exercising prime sync ioctl errors. The subtest constantly interrupts via signals a function doing concurrent blit to stress out the right usage of prime_sync_*, making sure these ioctl errors are handled accordingly. Important to note that in case of failure (e.g. in a case where the ioctl wouldn't try again in a return error) this test does not reliably catch the problem with 100% of accuracy. v2: fix prime sync direction when reading mmap'ed file. v3: change the upper bound using time rather than loops Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com> [ickle: fix memleak, run for longer]
2016-03-18igt/gem_concurent_blit: Exercise different object sizesChris Wilson
Searching for coherency problems that may arise with smaller-then-cache/large-then-cache objects. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-18igt/gem_concurrent_all: struct buffers for allChris Wilson
Now that we started packaging all parameters in one handy struct, pass them everywhere. This allows us to pass along requirements so that we can perform the checks inside each indvidual subtest and so not anger the igt gods. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-18igt/gem_softpin: Repeat tests with signal interruptionsChris Wilson
For the long running tests probing error conditions, throwing in the signal interruptions is a good idea. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-17igt/gem_exec_whisper: Move testing of "default" engine to standaloneChris Wilson
Exclude the symbolic "default" engine from the interengine sync testing, and move it onto the standalone testing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-16tests/pm_rps: Fix assert for sysfs writesVille Syrjälä
fprintf() returns a negative value on error. Fix the assert to catch that. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-03-15igt/drv_module_reload_basic: Pass correct inject_load_failure module optionImre Deak
The latest version of the inject_load_failure module option expects the number of the checkpoint where the failure should be injected, so adjust the test accordingly. Signed-off-by: Imre Deak <imre.deak@intel.com>
2016-03-15tests/gem_evict_alignment: use uint64_t in eviction memory parametersMika Kuoppala
With large apertures we need to use uint64_t for counts and sizes. commit 0e2071411a4d4e1488a821daf522dffde2809e03 paved way for this but forgot to change the subtest parameters. v2: Pass correctly to the copy() also (Chris) References: https://bugs.freedesktop.org/show_bug.cgi?id=93849 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2016-03-15igt/gem_bad_reloc: Rename conflicting negative-reloc-bltChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-15igt/gem_exec_whisper: Beware PIN_HIGHChris Wilson
Certain kernels/gen like to move execbuf around for relocations, disrupting our prewritten batches. Be more careful and try and keep the relocation/execobjects accurate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14igt/gem_bad_reloc: Fix handling of 64bit relocationsChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94537 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14drv_module_reload_basic: skip alive check after load failure injectionImre Deak
After loading the module with load failure injection enabled don't try check the alive state. Also limit the number of failure points to existing ones, to reduce the run time of the test. v2: - make VT binding/snd module loading part of reload and VT bind fail silently (Chris) Signed-off-by: Imre Deak <imre.deak@intel.com>
2016-03-14igt/gem_exec_nop: Decrease BAT timingChris Wilson
For basic, since CI doesn't hit the same hard lockup on Braswell that is possible without hpet, stop running for so long! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14igt/gem_exec_whisper: Exercise rings individuallyChris Wilson
Not as stressful as testing inter-ring synchronisation, but it does allow inspecting the simpler testcases if need be. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14igt/gem_exec_reloc: Exercise updating relocations of an active objectChris Wilson
Supersedes gem_dummy_reloc_loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14tests/gem_ring_sync_loop: Exercise all ringsChris Wilson
Fix the engine selection to exercise all possible rings and in doing so completely obsoletes gem_multi_bsd_sync_loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-12igt/gem_exec_whisper: Persistent relocation supportChris Wilson
The goal is to test interengine synchronisation so remove any likelihood that we introduce synchronisation for performing relocations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11igt/drv_module_reload_basic: Rinse and repeat with addition module parametersChris Wilson
An idea for testing failure paths along module load is to use a parameter to perform fault injection. This rudimentary framework should get us started. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11igt/gem_exec_whisper: Test submission between fdsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11igt/gem_exec_whisper: Stop passing NO_RELOCChris Wilson
We don't preserve the execobj.offset nor set the right values into the batches between iterations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11igt/gem_exec_whisper: Don't forget that 0 is a valid address on full-ppgttChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11tests: Add gem_exec_whisperChris Wilson
A more complicated store variant to stress inter-engine dependencies (i.e. semaphores and sync). We write a control value from one batch into the next and then execute it. This is repeated a few times with each execution happening on a different engine (so the kernel has to serialise operations between engines) until we finally write the value out into our scratch buffer where we can check the result, just like a Chinese whisper. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10igt/gem_exec_nop: Fix logical inversion for checking of valid execbufChris Wilson
Only if the trial __gem_execbuf reports an error do we want to remove the fancy LUT flags. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10igt/gem_reloc_overflow: 32bit compilation warningChris Wilson
gem_reloc_overflow.c: In function ‘__real_main365’: gem_reloc_overflow.c:384:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘size_t’ [-Wformat=] igt_require_f(mlock(reloc, reloc_size) == 0, ^ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10igt/gem_concurrent_blit: 32bit compilation warningChris Wilson
gem_concurrent_all.c: In function ‘__real_main1556’: gem_concurrent_all.c:1642:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uint64_t’ [-Wformat=] igt_debug("Pinning %ld MiB\n", pin_sz); Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10igt/drv_hangman: 32bit compilation warningChris Wilson
drv_hangman.c: In function ‘hangcheck_unterminated’: drv_hangman.c:290:27: warning: integer overflow in expression [-Woverflow] int64_t timeout_ns = 100 * NSEC_PER_SEC; /* 100 seconds */ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-09igt/gem_exec_nop: Only combine unique ringsChris Wilson
Ignore the default ring as that is purely symbolic. On BSD2 systems it is similarly useful to ignore the symbolic BSD ring. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-09tests/gem_reloc_overflow: Add missing igt_fixtureDaniel Vetter
Boom when running with --list on non-intel machines or as non-root. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-03-09igt/gem_exec_store: The simplest batch that does something!Chris Wilson
A very simple, the simplest!, batch that can execution on any known engine that just writes a value into memory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-08tests/kms_mmap_write_crc: Use the right fork helpersDaniel Vetter
For a background task the fork helpers are more appropriate, since we can explicitly cancel children. Also, anything that does real work is supposed to be in fixtures. Cc: Tiago Vignatti <tiago.vignatti@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> -- Tiago, can you pls check that I haven't broken anythig? Thanks, Daniel
2016-03-08igt/gem_exec_nop: Add a basic testChris Wilson
Demonstrate how trivial it is to lockup Braswell, at least my N3050 nuc, by saturating the interrupt handler with a few requests. References: https://bugs.freedesktop.org/show_bug.cgi?id=93467 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-08igt/gem_ringfill: Check full rings across suspend/hibernateChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-08igt/gem_exec_suspend: Check with both cached/uncached objectsChris Wilson
Keep an eye on domain tracking for both cached/uncached objects across suspend. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-08lib: Magic for_each_engine() macro to iterate over available enginesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-08igt/gem_exec_suspend: Do pre/post suspend double checksChris Wilson
Check that the system operates normally before and after the suspend (as well as across the suspend). The goal is to isolate the breakage to the subtest. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-08igt/gem_reloc_overflow: Fix errno tests for "overflow"Chris Wilson
The execbuffer2 ABI is not strictly limited to a total of UINT32_MAX entries, rather each object can have a maximum of UINT32_MAX relocation entries and the current implementation imposes that the total must be allocable in a contiguous buffer when necessary (i.e as large as the kernel can conceivably allocate). This is not an ABI constraint per-se, just an implementation issue. Whilst updating the limits for 64bit kernels, review usable of ioctl-wrappers (i.e. use __gem_execbuf now available) and include a batch of more tests to explore the boundary conditions of the maximum relocation size. Note that rather than guess the reloc-max, it would be better if we queried it. Also it is of vital importance that when constructing a test to fail in a particular fashion, it must not include any other error (e.g. we were passing in relocation arrays with invalid target handle and domains when looking for a potential overflow across multiple objects). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-07igt/pm_rpm: Wait for PCI D3Chris Wilson
The transition to PCI device state D3 is not instantaneous and only started when runtime suspended. Allow the driver/hardware a little bit of time to complete the transition before declaring a test failure. References: https://bugs.freedesktop.org/show_bug.cgi?id=93123 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-07gem_ppgtt: Fix flink-and-exit-vma-leak for engine->last_contextTvrtko Ursulin
Now that engines keep references on the last executed contexts, to fix this test we need to execute an unrelated context last to ensure the one we are interested in is free to be cleaned up when we expect it to be. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-03-07tests/kms_setmode: Fix compilation warnings.Marius Vlad
kms_setmode.c:384:30: warning: declaration of ‘drm_fd’ shadows a global declaration [-Wshadow] kms_setmode.c:45:12: note: shadowed declaration is here static int drm_fd; kms_setmode.c:391:38: warning: passing argument 8 of ‘drmModeSetCrtc’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] ids, crtc->connector_count, &crtc->mode); Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-03-07tests/kms_setmode: Add tests when not stealing encoders on same crtc.Maarten Lankhorst
Excercise connector stealing harder. There is a border case in atomic currently where encoder stealing is not prevented on the same crtc when the encoder is not reassigned. The following testcase excercises that path and causes a OOPS on my system with nightly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-03-04tests/kms_draw_crc: remove hardcoded PIPE_APaulo Zanoni
The test used to assume pipe A was being used for everything, and we tried to fix this in commit "tests: fix CRTC assignment for a few tests", but the pipe CRC code was forgotten. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-04kms_frontbuffer_tracking: Remove hardcoded PIPE_AGabriel Feceoru
Use the pipe which is given from the possible_crcs for that connected port instead. On BSW there are constrains for the crtc<-->connector, this fix make this test passing on BSW. v2 (from Paulo): bikeshed the blank lines. Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-03kms_frontbuffer_tracking: add missing igt_remove_fb callsPaulo Zanoni
Let's be good citizens and properly handle our garbage. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-03tests: fix CRTC assignment for a few testsPaulo Zanoni
All the tests I wrote always assumed that every connector supported CRTC 0. This is not the case for BSW and possibly others, so fix the tests before the CI reports more failures. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-03kms_frontbuffer_tracking: try harder to find suitable connectorsPaulo Zanoni
Instead of just giving preference to an eDP primary connector, give preference to one that's eDP and supports pipe A, then try lesser optimal combinations later. We could try to make our test suite use different sets of connectors when testing FBC and PSR, but that would require some rework, and we would still be helpless when testing the combination of FBC+PSR. Also notice that we still hardcode pipe A for the primary connector, regardless of whether it supports it. This will be solved in the next commits. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-03kms_frontbuffer_tracking: extract find_connector functionPaulo Zanoni
We're going to make our search for connnectors a little more complicated, so extract the function since we're going to call it a few more times. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-03kms_frontbuffer_tracking: don't pass the crtc idx to init_mode_paramsPaulo Zanoni
We already pass the crtc id, so use the id to retrieve the index. We'll change the way we pass the crtc id in the next commits, so we'll have to call a function to calculate the index based on the id at that point. Do the change now in order to avoid big commits later. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-03lib/igt_kms: add kmstest_get_crtc_idxPaulo Zanoni
Move it from pm_rpm.c to lib/igt_kms and remove the hardcoded version from kms_frontbuffer_tracking. I'm also planning to add other callers. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>