summaryrefslogtreecommitdiff
path: root/lib/drmtest.h
AgeCommit message (Collapse)Author
2021-12-07tests/kms_flip: Do not check for timestamp or sequences on MediatekMark Yacoub
[Why] Mediatek devices have a HW issue with sending their vblank IRQ at the same time interval everytime. The drift can be below or above the expected frame time, causing the timestamp to drift with a relatively larger standard deviation over a large sample. [How] Filter out the flags TEST_CHECK_TS and TEST_VBLANK_EXPIRED_SEQ from the tests flags, and restrict sequence and ts checks. Tested on Jacuzzi (MT8183) Signed-off-by: Mark Yacoub <markyacoub@chromium.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2021-09-09drmtest: Add DRIVER_MSM supportRob Clark
Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2021-07-02drmtest: Add is_msm_device checkMark Yacoub
Add support for MSM drivers. Signed-off-by: Mark Yacoub <markyacoub@chromium.org> Reviewed-by: Arkadiusz Hiler <arek@hiler.eu>
2020-10-30lib: Export drm_load_module()Chris Wilson
Beneath drm_open_driver() we have a routine that tries to load a module appropriate for the selected chipset. This can be useful for tests that want to ensure the right module is loaded prior to starting, without opening the device itself. Suggested-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-09-30tests: Add nouveau-crc testsLyude Paul
We're finally getting CRC support in nouveau, so let's start testing this in igt as well! While the normal CRC capture tests are nice, there's a number of Nvidia-specific hardware characteristics that we need to test as well. The most important one is known as a "notifier context flip". Basically, Nvidia GPUs store generated CRCs in an allocated memory region, referred to as the notifier context, that the driver programs itself. Strangely, this region can only hold a limited number of CRC entries, and once it runs out of available entries the hardware simply sets an overrun bit and stops writing any new CRC entries. Since igt-gpu-tools doesn't really have an expectation of only being able to grab a limited number of CRCs, we work around this in nouveau by allocating two separate CRC notifier regions each time we start capturing CRCs, and then flip between them whenever we get close to filling our currently programmed notifier context. While this keeps the number of CRC entries we lose to an absolute minimum, we are guaranteed to lose exactly one CRC entry between context flips. Thus, we add some tests to ensure that nouveau handles these flips correctly (pipe-[A-F]-ctx-flip-detection), and that igt itself is also able to handle them correctly (pipe-[A-F]-ctx-flip-skip-current-frame). Since these tests use a debugfs interface to manually control the notifier context flip threshold, we also add one test to ensure that any flip thresholds we set are cleared after a single CRC capture (ctx-flip-threshold-reset-after-capture). In addition, we also add some simple tests to test Nvidia-specific CRC sources. Changes since v5: * Fix typo Changes since v4: * Don't clear the currently set display pipe at the end of each iteration of pipe tests, otherwise we'll accidentally leave ourselves with no configured CRTCs when the test exits. Instead clear it at the start of each iteration of pipe tests but only if we just finished testing a different pipe. * Get rid of outdated comment about test_ctx_flip_detection() being limited to a single pipe * Clarify comments describing guarding against CRC collisions in test_ctx_flip_detection() * Make a small doc blurb for test_ctx_flip_detection(), it's a rather unusual and nvidia-specific behavior * Mention in test_ctx_flip_detection() that we also explicitly check that we've skipped -exactly- one frame. tl;dr more then one frame is too slow, less then one frame means a context flip just didn't happen when it should have. * Also check that the flip threshold we set in test_ctx_flip_threshold_reset_after_capture() isn't ignored by the driver * s/(create|destroy)_colors()/\1_crc_colors/g Changes since v3: * Update .gitlab-ci.yml to make nouveau exempt from the test-list-diff test, since all the cool kids are doing it and we don't care about autotools for nouveau Changes since v2: * Fix missing include in tests/nouveau_crc.c, this should fix builds for aarch64 Changes since v1: * Fix copyright year in nouveau_crc.c Reviewed-by: Jeremy Cline <jcline@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com>
2020-05-07lib/i915: Split igt_require_gem() into i915/Chris Wilson
igt_require_gem() is a pecularity of i915/, move it out of the core. Similar opportunistic move of gem_reopen_driver() and gem_quiescent_gpu(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-05lib/drmtest: Introduce __drm_open_driver_anotherArkadiusz Hiler
__drm_open_driver_another(int idx, ...) is a counterpart to __drm_open_driver(..) with the following changes: If device filters are provided the idx-th filter is used and the first matching device is selected. Consecutive calls to it, with increasing idx (starting from zero) are guaranteed to return fd of a different /dev/dri/ node than the previous calls or -1. Counterparts to other existing drm_open_*() should be introduced in similar fashion as the need arises. v2: (Petri) * try_modprobe if device is not found * split kms_prime changes into a separate commit Cc: Petri Latvala <petri.latvala@intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-12-04Add device selection in IGTZbigniew Kempczyński
New IGT command line argument --device, IGT_DEVICE enviroment and .igtrc Common::Device were added to allow selecting device using device selection API. See generated docs for device selection and lsgpu for more details on filters. NOTE: IGT_FORCE_DRIVER still works if no filter is selected. We may want to deprecate it later. NOTE2: This does not work with tests that open 2 or more devices (e.g. kms_prime). The core is capable of doing multiple filtering passes but we need to figure out how we want *open*() functions to expose this capability. v2 (Arek): * remove functions acting on igt_device_card * use only a single filter v3 (Arek): * typos, misspellings (Petri) * add notes on IGT_FORCE_DRIVER and opening 2 or more devices Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-11-14lib/rendercopy: Add AUX page table supportImre Deak
On GEN12+ the AUX CCS surfaces required by the render and media compression must be specified by a 3 level page table directory, which translates the main surface graphics address to the AUX CCS surface graphics address. For this purpose add support for creating a GEM buffer to translate the linear surface address range to the linear AUX surface address range. The buffers containing the main surface must be pinned down, since the directory table entry indices depend on the surface address, and they must be 64kB aligned. The page table can be relocated OTOH, so allow that and emit the required relocation entries. v2: - Make level variables to be 0 based (l1..l3 -> level=0..2). - Add missing drm_intel_bo_set_softpin_offset() stub to fix build on non-Intel archs. - Fix missing offsets in reloc entries of already bound objects. (Chris) - Randomize pin offsets, to try to avoid eviction. (Chris) - Remove redundant MI_NOOPS around MI_LOAD_REGISTER_MEM - Stop using explicit reloc cache domains, as these don't make sense on GEN12 anyway. (Chris) - Fix missing autotools support. (Chris) - s/igt_aux_pgtable/intel_aux_pgtable/, since the functionality is Intel specific. (Chris) v3: - Make sure all objects with an AUX surface are pinned. v4: - s/MI_LOAD_REGISTER_MEM/MI_LOAD_REGISTER_MEM_GEN8/ (Chris) - Fix using buf->bo->size instead of buf->size when finding a free range for a pinned obj. - Fix alignment of the reserved space start for a pinned obj. - Move gen12_emit_aux_pgtable_state() to its logical spot. v5: - Fix reloc emit call, passing a relative instead of absolute target offset. (Chris) - Fix off-by-one error when generating a random offset for pinned objs. Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-07-16lib: Ditch "DRIVER_* for kms tests" cargo cultDaniel Vetter
KMS is meant to be a (at least somewhat) generic userspace API. We do not want nor need to add a special match function for every driver ever written, that doesn't make sense, defeats the point of having generic tests for a generic testsuite, and really doesn't scale. Also add a comment so people don't try to add ever more of these. Also, this means no autoloading for you, but really igt should reinvent udev, and mostly this was needed for 2 reasons: - CI configuration falling to pieces because tests unloaded a driver, and then died before cleaning up. - vgem, which is fake, and needs to be requested explictily. We might want to throw that all out again, except for vgem. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Deepak Rawat <drawat@vmware.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: "Ser, Simon" <simon.ser@intel.com> Cc: Oleg Vasilev <oleg.vasilev@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-05-13lib: Add support for opening panfrost devicesTomeu Vizoso
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2019-03-27lib/drmtest: Add helpers to check and require amdgpuNicholas Kazlauskas
These helpers will be used to address amdgpu specific quirks and features. They're implemented like the i915 and VC4 helpers. In order for the string comparison to pick up "amdgpu" the buffer size had to be expanded for __is_device. I've gone ahead and made it 12 bytes to cover everything that's there right now. v2: rebase Cc: Leo Li <sunpeng.li@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
2019-03-20lib: Kill drm_get_card()Michał Winiarski
It's not operating on FD, and we've provided a nice reimplementation that does. Let's use it instead. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-02-26lib: drmtest: Add helpers to check and require the VC4 driverPaul Kocialkowski
In order to add support for features specific to the VC4 driver, add helpers for checking and requiring the driver like it's done for the i915 driver. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-12-20Add support for forcing a specific driverPetri Latvala
This commit adds a new option for forcing the use of a specific driver indicated via an environment variable. v2 (Petri): - Use an environment variable instead of command line - Refactor the loop in __open_device - Don't try to load kernel modules v3 (Petri): - Rebase and adjust to the driver loading changes Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: gustavo@padovan.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
2018-11-26v3d: Add a helper libraryEric Anholt
Just a few little ioctl wrappers that v3d tests will use. v2: Move the struct above the prototypes. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Petri Latvala <petri.latvala@intel.com> (v1)
2018-05-07lib: drop drmtest dependency on intel_batchbufferLionel Landwerlin
It doesn't look like there should be a dependency there. v2: s/intel_batchbuffer/intel_reg/ v3: One more s/intel_batchbuffer/intel_reg/ in benchmarks Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2017-11-29igt: Remove Android supportArkadiusz Hiler
This patch gets rid of the Android support, deleting all the hacks and moving code around to the places it belongs. Android build is not really maintained properly and rots rather fast. With recent push for Meson here and Android going for Soong it will only accelerate. It's a good time to drop the illusion of providing any support. Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Kalyan Kondapally <kalyan.kondapally@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-04-22igt: Import basic amdgpu tests from libdrmChris Wilson
Simple copy and replace of the CUnit tests inside libdrm to form a basis for further prime integration testing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-30lib/drmtest: Add comment explaining DRIVER_ANY excluding DRIVER_VGEMRobert Foss
Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-12lib/drmtest: add virtio_gpu supportGustavo Padovan
Support the virtio GPU on drmtest. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-06-18lib: Support opening vGEM deviceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-14lib: Expose is_i915_deviceTomeu Vizoso
Lib and test code can use this function to avoid i915-specific behavior when running on other drivers. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: add igt_require_intelTomeu Vizoso
Add function that requires that the driver we are talking to is i915. This allows us to skip subtests that are specific to that driver. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-03-19lib: Replace drmIoctl() with a layer of indirectionChris Wilson
Insted of calling drmIoctl() directly, call igt_ioctl() instead. In the normal scenario this is function pointer that calls drmIoctl() (so no penalty), but allows us to divert ioctls into our own routines for nefarious purposes. One such purpose will be to control interrupt generation into the ioctl, to be able to detect when we successfully interrupt the ioctl and when we no longer need more interrupts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-08igt: Add support for DRIVER_VC4 flags on tests.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-10-07lib/drmtest: Add do_ioctl_err to expect failureDaniel Stone
do_ioctl demands that the ioctl returns success; add a variant named do_ioctl_err, which expects the ioctl to fail, and demands a particular result. Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-09-11lib: remove support for deprecated drm_open_any*() callsMicah Fedke
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11lib: adding drm_open_driver() interfaceMicah Fedke
The drm_open_driver*() functions replace the drm_open_any*() functions and provide the same utility, but in a way that is platform agnostic, not intel-specific. This opens the path for adopting intel-gpu-tools to non-intel platforms. This commit renames the calls and adds the chipset parameter which can be used to restrict the opening to a specific hardware family. For example, drm_open_driver(DRIVER_INTEL) will only return a valid fd if an intel GPU is found on the system, along with performing intel-specific initialization stuff like gem_quiescent_gpu(), et al. If OPEN_ANY_GPU is specified, the first available drm device of any type will be opened. Other hardware type flags may be added in the future. The drm_open_any*() calls are retained as aliases of drm_open_driver*(OPEN_ANY_GPU) but will be removed in a subsequent patch. Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-22lib/drmtest.h : fix mmap64 againTim Gore
In android mmap64 was redirected to mmap2 because mmap64 was not alway available. But now mmap2 has been removed from 64 bit android builds (and mmap64 is available), so update preprocessor conditional to check for __x86_64__. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-19igt/drv_module_reload: Check more carefully for a live driverChris Wilson
As drm_open_any() now quietly fails if there is no driver, this nullifies the effectiviness of using gem_exec_nop as the test for a good reload. Combine with gem_alive (and guarantee that gem_alive can detect a dead driver, putting lie to commit 032f30cb38bb03562ee7fde19cd278b1d8ac31a9 Author: Thomas Wood <thomas.wood@intel.com> Date: Tue Jan 13 13:33:57 2015 +0000 lib: remove unnecessary checks on the drm_open_any return value ) first. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-30tests/pm_rpm: factor out drm_open_any_masterImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-04-25Reset errno to 0 after successChris Wilson
errno is only valid after a syscall wrapper (e.g. ioctl()) reports an error. However, we report the last errno value as a part of the igt_assert() output and so we display spurious values such as: Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:802: Last errno: 11, Resource temporarily unavailable Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || ... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-24tests: Extract ALIGN macro into a common headerTvrtko Ursulin
Makes for a little bit less code duplication, especially since it will be used from more callers in the future. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-03-28intel-gpu-tools: fix problem with redefinition of mmap64tgore
In android builds there is no reliable way to determine if mmap64 is defined or not, and this sometimes leads to a compile error due to its re-defnition. So this commit avoids its use altogether in intel-gpu-tools for Android builds, unless the HAVE_MMAP64 macro is defined. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib/drmtest: api documentationDaniel Vetter
Also rename the arguments of do_ioctl a bit for better clarity. I haven't figured out a way to reference other section headers, hence the links to igt_core and intel_batchbuffer are a bit fragile unfortunately. It gets the job done though. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib: extract igt_aux.[hc]Daniel Vetter
And shovel all the various helpers in there. Also move igt_set_vt_graphics_mode to igt_kms.h since the function is implemented in igt_kms.c. And it fits better. I kinda missed this in the prep work. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: s/drmtest_dumb_aub/igt_aub_dump_enabled/Daniel Vetter
This is prep work to extract a new igt aux library with all kinds of random stuff. Also give it a bit a more suitable name to indicate that this is just a flag and doesn't do the aub dumping itself. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 2Daniel Vetter
I've left unistd.h in it - it's not strictly required but most users of drmtest.h want it for the open helpers, and then you kinda need to close that file descriptor again ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22tests|lib: remove assert.h includesDaniel Vetter
Only the igt core and non-test tools should have asserts to catch internal errors, tests and helper libraries should all user igt_asert instead. Fix things up where assert instead of igt_assert was used. One tiny step towards header sanity. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: Move non-register things out of intel-gpu-tools.hDaniel Vetter
Right now almost everything in there concerns itself with register access. Move everything else out (into drmtest.h for lack of better place) to prepare for api documentation. Also rename intel_drm.c to intel_os.c since it contains OS, not drm abstractions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib: move prefault helpers to igt_debugfs.cDaniel Vetter
This way all debugfs library code is in one place, ready for some api documentation care. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib: extract igt_core.cDaniel Vetter
Same game as with ioctl_wrappers.c. To split was rather clean except for the static function oom_adjust_for_doom. But that was a bug, the calls to it in the various open helpers should simply be done at init and fork time. Which was already the case, except for simple testcase. So fix it up. While at it also start with a small section header for the documentation. v2: Don't forget to update the xml template ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/ioctl_wrappers: api docDaniel Vetter
Also some tiny polish to function interface: - @caching in gem_set_tiling should be uint32_t to match the ioctl struct. - s/size/length/ for gem_write/read. - move gem_get_num_rings to the other ring feature helpers. v2: Also demote gem_require_ring from static inline and move it, too. v3: Also move gem_handle_to_libdrm_bo. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11lib: extract ioctl_wrappers.cDaniel Vetter
I want to group the ioctl wrappers and related functions into their own documentation section. Apparently gtkdoc refuses to obey this wish without a corespdonding header. So appease it. Also gtkdoc seems to struggle with rebuilding a bit ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11drmtest: reformat the API documentationThomas Wood
Make the existing documentation compatible with gtk-doc. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13lib: (somewhat) structured logging supportDaniel Vetter
Apparently there's a bit a need for more verbose output in testcases, mostly for debugging purposes. At least gem_reset_stats and pm_rps have a verbose mode. On top of that we're currently not taking advantage of piglit's "warn" state all that much. But I think it might be useful for testcases which are notorious for some kinds of spurious failures, like e.g. the really nasty timing checks in kms_flip. If we demote some of them to just warnings we could run the overall tests more often. Hence this patchs adds a new igt_log function with the three levels DEBUG, INFO and WARN. Plus a bunch of convenience helpers to keep the test code tidy. The level can be set through an enviroment vairable IGT_LOG_LEVEL with info being the default. Also tests can look at the selected log level in case they want to run costly debug functions only when needed. Comments highly welcome, I plan to roll this out over tests which can use it (not all, imo that's too much churn) once we've settled on the interfaces/semantics. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-12lib: Make igt_skip noreturnDaniel Vetter
This is a remnant from the subtest code before we had proper fixture blocks. With those there's no no reason to have igt_skip calls outside of fixtures or subtests, so we can assert this and hence always jump out. Suggested by Thomas Wood since static analyzers got confused about this. To check for fallout I've run all tests as non-root so that they'll all skip. Only very little fallout resulted. Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-11lib: Add a helper to wait for a keypressDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>