summaryrefslogtreecommitdiff
path: root/tests/debugfs_test.c
AgeCommit message (Collapse)Author
2018-11-27tests/debugfs: use igt_display_requireDaniel Vetter
Need to extract into a test subgroup to make sure we only skip the tests that need display support. v2: Chris pointed out that "read-all-entries" was the original non-kms tests, and we don't want to skip that if there's no output. Make a seperate test for this. Also, that kind of where libraries magically second-guess what the test might have wanted when it supplies an invalid request is exactly why I want to fix the igt_display_init API regression. v3: Actually squash in the hunk that was supposed to do v2 into this patch (Antonio). Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-By: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-02-27igt/debugfs_tests: Record which file is being opened in kmsgChris Wilson
When tracking down the cause of a particular kernel warning, knowing which file it is associated with can be a big clue. So write the filename into the kernel message log prior to opening it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-11-03tests/debugfs_test: Pretty print subdirectoriesMaarten Lankhorst
Instead of: (debugfs_test:1499) DEBUG: Reading file "data" (debugfs_test:1499) DEBUG: Could not open file "data" with error: Input/output error Print: (debugfs_test:1360) DEBUG: Entering subdir crtc-2 (debugfs_test:1360) DEBUG: Entering subdir crc (debugfs_test:1360) DEBUG: Reading file "data" (debugfs_test:1360) DEBUG: Could not open file "data" with error: Input/output error (debugfs_test:1360) DEBUG: Reading file "control" Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-12tests/debugfs_test: Try to light all outputs to increase chances of finding ↵Maarten Lankhorst
fails, v3. Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled. This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup. Changes since v1: - Put framebuffers on all primary planes, to get a crc from i915_sink_src_eDP1. Changes since v2: - Use igt_output_get_plane_type, not igt_output_get_plane. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Add comment suggested by ickle.] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-08build: Nuke #ifdef HAVE_CONFIG_H cargo-cultDaniel Vetter
We have it. Daniel Stone said the #ifdef HAVE_CONFIG_H comes from the X11 transition to the modular build, where in the imake -> modular build transition config.h wasn't universally available. Now we just make this a requirement (so yeah Android better generate one too). v2: Improve commit message a bit. 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-07-24tests/debugfs_test: Fix testcases to passMaarten Lankhorst
emon_crash should skip if the debugfs file could not be opened the first time, and debugfs_test.read_all_entries should skip files that could not be opened, instead of returning an error. This is because in a typical IGT run there may be more debugfs files registered than can be opened. This is an example on f2-pnv-d510: $ grep -r . /sys/kernel/debug/dri/0 >/dev/null grep: /sys/kernel/debug/dri/0/i915_sseu_status: No such device grep: /sys/kernel/debug/dri/0/i915_energy_uJ: No such device grep: /sys/kernel/debug/dri/0/i915_sink_crc_eDP1: No such device grep: /sys/kernel/debug/dri/0/i915_emon_status: No such device grep: /sys/kernel/debug/dri/0/i915_guc_log_control: Invalid argument grep: /sys/kernel/debug/dri/0/i915_fbc_false_color: No such device grep: /sys/kernel/debug/dri/0/i915_cur_wm_latency: No such device grep: /sys/kernel/debug/dri/0/i915_spr_wm_latency: No such device grep: /sys/kernel/debug/dri/0/i915_pri_wm_latency: No such device grep: /sys/kernel/debug/dri/0/i915_next_seqno: Permission denied grep: /sys/kernel/debug/dri/0/i915_cache_sharing: No such device grep: /sys/kernel/debug/dri/0/i915_min_freq: No such device grep: /sys/kernel/debug/dri/0/i915_max_freq: No such device grep: /sys/kernel/debug/dri/0/i915_pipe_C_crc: No such device grep: /sys/kernel/debug/dri/0/i915_forcewake_user: Invalid argument grep: /sys/kernel/debug/dri/0/crtc-1/crc/data: Input/output error Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2017-07-17tests/debugfs_test: Add a shorter timeout when reading sysfs entriesAbdiel Janulgue
This allows us to proceed gracefully without invoking the global CI-level timeout especially when opening the buggy crtc-data file descriptor. Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-07-06Revert "igt/debugfs_test: Skip dummy reads for crtc-n/crc/data"Abdiel Janulgue
This reverts commit 9a6ed6c6398c2218d65392593fa43852810515cc. Test actually exposes a bug in the kernel where opening the crtc-data file takes a long time. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-07-04igt/debugfs_test: Skip dummy reads for crtc-n/crc/dataAbdiel Janulgue
When descending thru debugfs directory. Doing this tends to takes forever. CRC pipe read tests for this are already covered under kms_pipe_crc_basic. v2: Be more verbose that the check is meant for the crtc control data Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Cc: arkadiusz.hiler@intel.com Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-07-04tests/debugfs_test: Allow opening CRC to fail with -EIO.Maarten Lankhorst
This currently only happens when the power well is not enabled, but in theory should happen every time the file is opened when the CRTC is not enabled. This fixes debugfs_test@read_all_entries failing on f2-bxt-j3405. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-06-16Convert debugfs shell tests to C versionAbdiel Janulgue
v4: Rename get_sysfs_entry -> read_and_discard_sysfs_entry, assert on null igt_sysfs_get() (Arek). v3: Drop redundant test covered by drv_hangman/basic. Descend thru debugfs path when reading sysfs entries (Chris). v2: Use internal igt_debugfs functions instead of cat and document debugfs tests. Convert sysfs_l3_parity properly. Rename redundant names in tests. Converted: - debugfs_emon_crash - debugfs_wedged - drv_debugfs_reader Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>