summaryrefslogtreecommitdiff
path: root/lib/igt_aux.c
AgeCommit message (Collapse)Author
2019-05-09lib/aux: Call setgroups() in igt_drop_root() before setgid()Lyude Paul
While igt isn't really security sensitive, forgetting to call setgroups() before calling setgid() causes rpmlint on Fedora to complain: igt-gpu-tools.x86_64: E: missing-call-to-setgroups-before-setuid /usr/lib64/libigt.so.0 ... missing-call-to-setgroups-before-setuid: This executable is calling setuid and setgid without setgroups or initgroups. There is a high probability this means it didn't relinquish all groups, and this would be a potential security issue to be fixed. Seek POS36-C on the web for details about the problem. Since it's likely other package maintainers for other distros will have to deal with similar issues eventually, and I can't see any harm in it, let's do the right thing and call setgroups() first. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Lyude Paul <lyude@redhat.com>
2019-05-09lib/aux: Use igt_assert_eq() in igt_drop_root()Lyude Paul
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Lyude Paul <lyude@redhat.com>
2019-04-26lib: consolidate duplicated define of vfs_file_max(void)Caz Yokoyama
Remove it from intel_os.c and gem_exec_reuse.c and globally define in igt_aux.c. v3: update comment in the code and commit message. Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-25tests/kms_chamelium: add dp-audio testSimon Ser
This new test ensures DisplayPort audio works by using the Chamelium. It enables the DisplayPort output and sends an audio signal containing a set of frequencies we choose to all HDMI/DisplayPort audio devices. It starts recording audio on the Chamelium device and uses the stream server to retrieve captured audio pages. It then checks that the capture audio signal contains the frequencies we sent, and only those, by computing a FFT. A new library has been added to libigt to communicate with the stream server. It implements a simple custom TCP protocol. In case the test fails, a WAV file with the captured data is saved on disk. Right now the test has a few limitations: - Only the first channel is checked - IGT only generates audio with a single sampling rate (48 KHz) - Audio data is not captured in real-time These limitations will be lifted in future patches. PulseAudio must not run during the tests since ALSA is used directly. To ensure this, edit /etc/pulse/client.conf and add `autospawn=no`. Then run `pulseaudio --kill`. This commit deletes the existing audio tests. They weren't run and required an exotic configuration (HDMI audio splitter, dummy HDMI sink and a line-in port on the DUT). This patch also changes lib/igt_audio to use uint16_t instead of short. The rationale is: - The standard says a short is at least 16 bit wide, but a short can be larger (in practice it won't happen, but better use types correctly) - It makes it clearer that the audio format is S16_LE, since "16" is in the type name. This patch depends on the following Chameleon bugs: - https://crbug.com/948060 - https://crbug.com/950857 Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-04-10lib: Reset errno to 0 after isattyArkadiusz Hiler
Since igt_assert family of functions logs last errno we get a lot of those: "Last errno: 25, Inappropriate ioctl for device" isatty() seems to be the biggest offender in that area, so this patch should limit amount of confusing messages significantly. Cc: Martin Peres <martin.peres@linux.intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-09lib: Use nr_open not file-max for setting fd rlimitChris Wilson
Petri pointed out that the maximum allowed number of files per process is nr_open, not the system cap of file-max. Suggested-by: Petri Latvala <petri.latvala@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110351 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-05lib: add igt_allow_unlimited_files()Lucas De Marchi
Share the implementation to tweak the maximum number of open files. The version in tests/i915/gem_exec_reuse.c was a little bit different, but I don't think it needs to be because it would still return a failure if any of the calls to setrlimit() fail. So I'm using the other one. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-08lib/aux: Plug memory leak in get_suspend_testPetri Latvala
Free test_line in all paths out of the function. v2: Avoid freeing too soon (Chris) Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-08lib/aux: Plug memory leak in __igt_lsof_fdsPetri Latvala
Add a missing closedir call. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-01-28igt_aux: Handle empty pm_test file gracefullyPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-01-22lib: Include the size in the error message for mlockChris Wilson
Knowing how much we tried to allocate would be useful if one should need to debug why it failed. References: https://bugs.freedesktop.org/show_bug.cgi?id=109439 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-07-19lib: Move trash_bos to their only userChris Wilson
Only pm_rpm still uses the igt_trash_aperture() and so we can remove it from the lib and in the process convert it over from the legacy libdrm_intel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2018-07-11Avoid truncate string in __igt_lsof_fdsRodrigo Siqueira
Note that 'proc_path' parameter in __igt_lsof_fds receives a string which was initialized with the size of PATH_MAX and the local variable 'path' has the same size, but it also have to append: '/', '\0', and the directory name. This situation caused the warning described below. warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Wformat-truncation=] snprintf(path, sizeof(path), "%s/%s", proc_path, d->d_name); note: ‘snprintf’ output between 2 and 4352 bytes into a destination of size 4096 [..] This commit fixes this problem by changing the string size passed by __igt_lsoft to __igt_lsof_fds. The max size for the string is strlen("/proc/%d/cwd")+1 where "%d" can be estimated with CEILING(LOG_10(INT_MAX)), in this sense, it is safe to define a path size of 30 characters. Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-06-21Account for NULL character when using strncpyRodrigo Siqueira
This patch fix the following gcc warning: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] strncpy(data->name, name, PARAM_NAME_MAX_SZ); This error happens due to the '\0' character appended by strncpy. Notice that reduces by one in the total of bytes to be copied, in this case, is harmless because the strings received in the parameter already have '\0'. Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-05-06lib: Show the kernel stack when reporting a GPU hangChris Wilson
In a few tests (like gem_exec_await, gem_exec_schedule) we use the GPU hang to break a deadlock hit during test setup. In these case we would like to see where in kernel the process is stuck (if at all). References: https://bugs.freedesktop.org/show_bug.cgi?id=105900 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-02-27igt: Make libudev mandatoryAntonio Argenziano
Since more essential components use libudev, make its dependency mandatory. Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-02-16lib/igt_aux: Add function to swap int64 in arrayAntonio Argenziano
v2: Use igt_swap() Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michal Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-05lib: avoid < in gtkdoc commentsDaniel Vetter
For reasons entirely not clear to me meson gtkdoc runs in strict xml parsing mode, whereas automake gtkdoc doesn't. And gtkdoc itself is tooooooooo dense to correctly escape this stuff. Paper around this. v2: {foo} instead of of tripy &lt;foo> (Joonas) v3: More fixups (Joonas) Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-11-29Revert "lib/igt_aux: Make procps optional"Arkadiusz Hiler
This reverts commit d7d3f4e87b827152f00bdf89a67871736672b492 and gets rid of the config option from the meson.build. It was needed only for the Android support. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Petri Latvala <petri.latvala@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-11-16lib: Dump /sys/kernel/debug/suspend_stats after suspend failureChris Wilson
I noticed that dpm was storing some information about which phase of suspend failed inside suspend_stats. That will be useful to help debug such failures, so automatically dump it after suspend fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-19lib/i915: Move submission related helpers to lib/i915/gem_submissionMichał Winiarski
Since I accidentally broke the build for some, by putting the pretty printer for submission inside ifdef HAVE_PROCPS, it's time to move the whole thing into lib/i915 while fixing this mistake. Let's also rename the pretty printer and add a doc to it as well as the section. Fixes: f6dfe556659f ("lib: Extract helpers for determining submission method") Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-17lib: Extract helpers for determining submission methodMichał Winiarski
Couple of tests are using either determining submission method, or pretty printing. Let's move those to helpers in lib. v2: s/igt_show/gem_show Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-16aux: Use IGT version of system() call to run rtcwakeImre Deak
The clone() system call has difficulty to make progress if interrupted frequently by the signal helper process. At least on an APL, like in the Bugzilla ticket below, this can introduce minutes of overhead to a single system() call (leading to a global CI timeout). To get rid of the overhead suspend the signal helper process for the duration of the system() call, which is provided already by igt_system(). Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103160 Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-16aux: Suspend signal helper for shell commandsImre Deak
The clone() system call with a larger executable (like /bin/sh) may have difficulty to make progress on some platforms if interrupted frequently. So suspend the signal helper process for the duration of the syscall. This is needed to solve an actual problem by the next patch. v2: - Clarify/fix code comments. (Chris) - Update igt_system_quiet() as well accordingly. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
2017-09-28lib: Capture the error state on an unexpected hangChris Wilson
Dump debugfs/i915_error_state to the debug channel if we detect an ERROR uevent. This poses a few problems, not least that it is the auxiliary process doing the dumping (so the output may be interleaved with the test, but considering a hang occurred it is likely the test is blocked) and the average error state is around 60k, which may prove unwieldy! On the other hand, it may prove invaluable in debugging those impossible to reproduce bugs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-08build: use HAVE_LIBGEN_H consistentlyDaniel Vetter
Also, we are _GNU_SOURCE, so simplify the conditions accordingly. The next patch will remove _GNU_SOURCE everywhere else. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08lib/kms: Fix the connector name strings to match what the kernel usesVille Syrjälä
We depend on kmstest_connector_type_str() matching the kernel. Fix up the cases where we differ currently. Also add the missing DPI "connector" type. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-08-30lib/igt_aux: Allow sysfs open to fail when setting suspend/resume delayPaul Kocialkowski
This removes the igt_require condition on the sysfs open call used to write the suspend/resume delay so that it is allowed to fail. Intsead, the code that depends on it is put in a conditional block. This allows running test binaries as a non-privileged user for e.g. listing the available tests with the SuspendResumeDelay parameter set in igtrc configuration. Sysfs access would otherwise cause it to fail. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-07-28lib/aux: Better debug output for rtcwakeDaniel Vetter
Printing the error code is kinda useful. Also tune down the blame shifting away from i915, this could very well be an i915 bug, not just a setup issue. Also move the notice to the require test, not the failure, and suggest to look into dmesg. v2: Dont print errno, igt_require/assert already do that in the failure case (Chris). Acked-by: tomi.p.sarvela@intel.com Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-07-06Make igtrc configuration common, with configurable suspend/resume delayPaul Kocialkowski
This adds support for configurable suspend/resume delay and takes the occasion to move igtrc configuation from igt_chamelium to igt_core. This way, suspend/resume delay configuration can be used for all tests. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-06-27lib/igt_aux: Use provided autoresume delay for rtc wakePaul Kocialkowki
This stores the autoresume delay provided via igt_set_autoresume_delay for use during suspend via rtc wake scheduling. This delay was previously only used for pm_test suspendm while the function suggests it should be applied to all autoresume cases. There is also definitely a use case for configuring the rtc wake delay, so this implements it. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-06-21lib: Force global reset + uevents for hang detectorChris Wilson
The hang detector relies on a uevent for notification and aborting the test. As proposed, fine-grained resets may not produce a global uevent and so this hang detection becomes void. As we don't expect any hang, we can just reduce the reset to only a global + uevent and so maintain functionality, and switch back to fine-grained resets afterwards. Note that any test that requires testing fine-grained resets should ensure that they are enabled first as igt may leave the global parameters in an inconsistent state. v2: Restore fine-grained resets for explict igt_allow_hang() Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
2017-06-07lib/igt_aux: Make procps optionalArkadiusz Hiler
Android does not have procps and it's not easy to compile it as a dependency. We can provide alternative, "naive" implementation that just shells out to external commands (i.e. pkill and lsof) in case we do not have the library. v2: have separate functions for naive impls (J. Nikula) Cc: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-07Make conditions on HAVE_UDEV consistentArkadiusz Hiler
We have a lot of `#ifdef HAVE_UDEV` and ` #if HAVE_UDEV` all over the place, but ifdef and if have a slightly different semantics. Let make it consistent by using #ifdefs only. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring commit 301ad44cdf1b868b1ab89096721da91fa8541fdc Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Thu Mar 2 10:37:11 2017 +0100 lib: Open debugfs files for the given DRM device with fixes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-10igt: Exercise the shrinkerChris Wilson
Introduce a new fork helper that spawns a process that just repeatedly calls i915_gem_shrink_all() and watch what happens as we try to use objects that have been shrunk. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-09lib: Fix hang detectorChris Wilson
The kill/signal became mismatched in commit d930b6493d93 ("lib: Add basic support for valgrind annotations.") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-07lib: Break poll loop to check for a missed signalChris Wilson
If our parent dies, so should we. Our parent should kill us before it exits, but just in case we escape, wake up periodically to check upon our parent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-07lib: Check for dead parent first in hang detectorChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-27lib: Add basic support for valgrind annotations.Maarten Lankhorst
SIGRTMAX appears to be used by valgrind now for its internal tracking, so avoid it in the helpers. Also add some valgrind annotations in gem_mmap, to make sure that its accesses are tracked correctly. I've also added gem_munmap, but there are a lot of places that don't use it yet in tests/. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-01-26igt_aux: Add igt_set_autoresume_delay()Lyude
The default autoresume delay is about 5 seconds. It's possible on a system that's not very fast this might not be a long enough time, since an asynchronous hotplug event we scheduled on the chamelium that was intended to happen during suspend could happen before we actually manage to suspend. So, add a function that allows us to increase the autoresume time to ensure this never happens during suspend/resume tests with the chamelium. Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net> Signed-off-by: Lyude <lyude@redhat.com> Changes since v1: - Use igt_require, not assert
2016-12-13lib: Allow permutation of the first two elements in the arayChris Wilson
Spotted-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01lib/igt_kmod: New library to support driver loading/unloading and additional ↵Marius Vlad
helpers. lib/igt_aux: Added igt_pkill and igt_lsof helper. lib/igt_kmod: Added load/unload kmod helpers. v7: - document the case where leaving stray fd from drm_open_driver() might fail reloading the driver. - list also current opened files from /dev/dri in case we could not unload the driver. - convert igt_info to igt_warn (Chris Wilson) - added KMOD_|PROCPS CFLAGS (Chris Wilson) v6: - include latest modifications from tests/drv_module_reload: display all loaded modules and list information about opened files by processes (Petri Latvala) v5: - added igt_i915_driver_{load/unload}. - added kick_snd_hda_intel() to match current tests/drv_module_reload_basic and integrated into igt_i915_driver_load/unload. - added gtk-doc section for lib/igt_kmod v4: - decided to split libkmod helpers into their own file as there's another user lib/igt_gvt or tests/gvt_basic. - fixed some gtk-doc documentation. v3: - return -errno (igt_pkill()) in case of failure (Cris Wilson) - return bool for igt_kmod_is_loaded(), replaced strncasecmp with strncmp (Chris Wilson) v2: - Renamed libkmod helpers (Chris Wilson) - Removed SIGTERM/SIGKILL case where we repeatedly tried to terminate the process: just call kill(2) once (Chris Wilson) - Removed redundant check in igt_kmod_unload(), igt_module_in_use() (Chris Wilson) - Pass flags to igt_kmod_unload() from the caller (Chris Wilson) - Removed useless function igt_kill() which acts just as kill(2) (Chris Wilson) Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-11-29lib: Make signal helper definitions reusableAbdiel Janulgue
Lots of test cases are re-declaring this. v2: Remove definition in benchmarks/gem_syslatency.c Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-10-18lib/igt_aux: Improve documentation for igt_system_suspend_autoresume()Imre Deak
While at it fix the order of states for consistency. Suggested by Daniel. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-10-13lib/igt_aux: Add support for various system suspend/resume optionsImre Deak
To have a more accurate idea about any suspend/resume issues we can perform the s/r until various phases in the s/r sequence. This way we can isolate the given problem as being a device driver, kernel core or BIOS related issue. Actual subtests using these new s/r phases will be added as follow-up. While at it also add the freeze suspend target, it's something we also would need to test. Signed-off-by: Imre Deak <imre.deak@intel.com>
2016-07-27lib: update docs for igt_pmDaniel Vetter
- Move all the pm helpers into igt_pm.c. No idea why that wasn't done in the original commit that created igt_pm.c. - Add missing docs where needed. Cc: David Weinehall <david.weinehall@intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>