igt test naming conventions
cover igt test naming conventions
Hi all,
Spurred by the ongoing discussions about improving our tests I've started to document some of the naming patterns a bit. I've also added a few new ones and renamed a bunch of tests.
The idea is that developers can use this patterns to construct add-hoc test groups with piglit's -t/-x options. I hope this here is a good start, but we certainly need to refine the patterns and test names over time.
To ensure that we have sufficient coherency I propose the following rules:
- If you add a large pile of new tests please document any new tests patterns in tests/NAMING-CONVENTIONS.
- Any patches that are relevant for the test naming conventions must be posted to intel-gfx to keep everyone in the loop.
Comments and ideas both on the patches and process highly welcome.
Cheeers, Daniel
Daniel Vetter (5):
tests: Start to document naming conventions
tests: estbalish drv_ prefix
tests: establish pm_ prefix
tests: Use kms_ prefix a bit more
tests: establish core_ prefix
README | 3 + tests/.gitignore | 16 +- tests/Makefile.am | 26 +- tests/NAMING-CONVENTION | 63 ++++ tests/ZZ_hangman | 70 ---- tests/ZZ_missed_irq | 72 ---- tests/core_getclient.c | 61 ++++ tests/core_getstats.c | 50 +++ tests/core_getversion.c | 49 +++ tests/debugfs_pipe_crc.c | 262 -------------- tests/debugfs_reader | 9 - tests/drv_debugfs_reader | 9 + tests/drv_hangman | 70 ++++ tests/drv_missed_irq_hang | 72 ++++ tests/drv_module_reload | 50 +++ tests/drv_suspend.c | 171 +++++++++ tests/gem_suspend.c | 171 --------- tests/getclient.c | 61 ---- tests/getstats.c | 50 --- tests/getversion.c | 49 --- tests/kms_pipe_crc_basic.c | 262 ++++++++++++++ tests/kms_sysfs_edid_timing | 25 ++ tests/module_reload | 50 --- tests/pc8.c | 822 -------------------------------------------- tests/pm_pc8.c | 822 ++++++++++++++++++++++++++++++++++++++++++++ tests/pm_rc6_residency.c | 121 +++++++ tests/pm_rps.c | 194 +++++++++++ tests/sysfs_edid_timing | 25 -- tests/sysfs_rc6_residency.c | 121 ------- tests/sysfs_rps.c | 194 ----------- 30 files changed, 2043 insertions(+), 1977 deletions(-) create mode 100644 tests/NAMING-CONVENTION delete mode 100755 tests/ZZ_hangman delete mode 100755 tests/ZZ_missed_irq create mode 100644 tests/core_getclient.c create mode 100644 tests/core_getstats.c create mode 100644 tests/core_getversion.c delete mode 100644 tests/debugfs_pipe_crc.c delete mode 100755 tests/debugfs_reader create mode 100755 tests/drv_debugfs_reader create mode 100755 tests/drv_hangman create mode 100755 tests/drv_missed_irq_hang create mode 100755 tests/drv_module_reload create mode 100644 tests/drv_suspend.c delete mode 100644 tests/gem_suspend.c delete mode 100644 tests/getclient.c delete mode 100644 tests/getstats.c delete mode 100644 tests/getversion.c create mode 100644 tests/kms_pipe_crc_basic.c create mode 100755 tests/kms_sysfs_edid_timing delete mode 100755 tests/module_reload delete mode 100644 tests/pc8.c create mode 100644 tests/pm_pc8.c create mode 100644 tests/pm_rc6_residency.c create mode 100644 tests/pm_rps.c delete mode 100755 tests/sysfs_edid_timing delete mode 100644 tests/sysfs_rc6_residency.c delete mode 100644 tests/sysfs_rps.c
Signature · 1 line
1.8.4.rc3
PATCH 1/5 tests: Start to document naming conventions
Just a start and we need more work here. Some follow-up patches will clear up some of the historical confusion.
While at it rename the pc8 "basic" test to "rte".
--- README | 3 +++ tests/NAMING-CONVENTION | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/pc8.c | 2 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 tests/NAMING-CONVENTION
README +3 -0
@@ -62,6 +62,9 @@ tests/ options to test different kms functionality, again read the source for the details. + When creating new tests or subtests please read and follow + tests/NAMING-CONVENTION. + lib/ Common helper functions and headers used by the other tools.
tests/NAMING-CONVENTION new file +56 -0
56 lines not on this page · raw message
tests/pc8.c +1 -1
@@ -790,7 +790,7 @@ int main(int argc, char *argv[])igt_fixture setup_environment (); - igt_subtest("basic") + igt_subtest("rte")basic_subtest (); igt_subtest("drm-resources-equal")drm_resources_equal_subtest ();
Signature · 1 line
1.8.4.rc3
PATCH 2/5 tests: estbalish drv_ prefix
In reply to Daniel Vetter--- tests/.gitignore | 2 +- tests/Makefile.am | 10 +-- tests/NAMING-CONVENTION | 2 + tests/ZZ_hangman | 70 ------------------- tests/ZZ_missed_irq | 72 ------------------- tests/debugfs_reader | 9 --- tests/drv_debugfs_reader | 9 +++ tests/drv_hangman | 70 +++++++++++++++++++ tests/drv_missed_irq_hang | 72 +++++++++++++++++++ tests/drv_module_reload | 50 ++++++++++++++ tests/drv_suspend.c | 171 ++++++++++++++++++++++++++++++++++++++++++++++ tests/gem_suspend.c | 171 ---------------------------------------------- tests/module_reload | 50 -------------- 13 files changed, 380 insertions(+), 378 deletions(-) delete mode 100755 tests/ZZ_hangman delete mode 100755 tests/ZZ_missed_irq delete mode 100755 tests/debugfs_reader create mode 100755 tests/drv_debugfs_reader create mode 100755 tests/drv_hangman create mode 100755 tests/drv_missed_irq_hang create mode 100755 tests/drv_module_reload create mode 100644 tests/drv_suspend.c delete mode 100644 tests/gem_suspend.c delete mode 100755 tests/module_reload
tests/.gitignore +1 -1
@@ -1,6 +1,7 @@ # Please keep sorted alphabetically ddi_compute_wrpll debugfs_pipe_crc +drv_suspend drm_get_client_auth drm_vma_limiter drm_vma_limiter_cached
@@ -74,7 +75,6 @@ gem_storedw_loop_bsd gem_storedw_loop_render gem_storedw_loop_vebox gem_stress -gem_suspend gem_threaded_access_tiled gem_tiled_blits gem_tiled_fence_blits
tests/Makefile.am +5 -5
@@ -18,6 +18,7 @@ endif TESTS_progs_M = \ debugfs_pipe_crc \ + drv_suspend \ gem_basic \ gem_caching \ gem_concurrent_blit \
@@ -47,7 +48,6 @@ TESTS_progs_M = \ gem_ringfill \ gem_set_tiling_vs_blt \ gem_storedw_batches_loop \ - gem_suspend \ gem_tiled_blits \ gem_tiled_partial_pwrite_pread \ gem_write_read_ring_switch \
@@ -131,14 +131,14 @@ TESTS_scripts_M = \ TESTS_scripts = \ debugfs_emon_crash \ - debugfs_reader \ - module_reload \ + drv_debugfs_reader \ + drv_hangman \ + drv_missed_irq_hang \ + drv_module_reload \ sysfs_edid_timing \ sysfs_l3_parity \ test_rte_check \ tools_test \ - ZZ_hangman \ - ZZ_missed_irq \ $(NULL) # This target contains testcases which support automagic subtest enumeration
tests/NAMING-CONVENTION +2 -0
@@ -17,6 +17,8 @@ gem_: Used for all kinds of GEM tests. prime_: Used for buffer sharing tests, both for self-importing (used by dri3/wayland) and actual multi-gpu tests. +drv_: Tests for overall driver behaviour like module reload, s/r, debugfs files. + gen3_: Used by Chris' gen3 specific tiling/fencing tests. Generally tests that only run on some platforms don't have a specific prefix but just skip on platforms where the test doesn't apply.
tests/ZZ_hangman deleted +0 -70
70 lines not on this page · raw message
tests/ZZ_missed_irq deleted +0 -72
72 lines not on this page · raw message
tests/debugfs_reader deleted +0 -9
@@ -1,9 +0,0 @@ -#!/bin/bash - -SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )" -. $SOURCE_DIR/drm_lib.sh - -# read everything we can -cat $i915_dfs_path/* > /dev/null 2>&1 - -exit 0
tests/drv_debugfs_reader new file +9 -0
@@ -0,0 +1,9 @@ +#!/bin/bash + +SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )" +. $SOURCE_DIR/drm_lib.sh + +# read everything we can +cat $i915_dfs_path/* > /dev/null 2>&1 + +exit 0
tests/drv_hangman new file +70 -0
70 lines not on this page · raw message
tests/drv_missed_irq_hang new file +72 -0
72 lines not on this page · raw message
tests/drv_module_reload new file +50 -0
50 lines not on this page · raw message
tests/drv_suspend.c new file +171 -0
171 lines not on this page · raw message
tests/gem_suspend.c deleted +0 -171
171 lines not on this page · raw message
tests/module_reload deleted +0 -50
50 lines not on this page · raw message
Signature · 6 lines
1.8.4.rc3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/5 tests: establish pm_ prefix
In reply to Daniel VetterImo power management, power consumption and performance are tightly enough coupled that we can throw them all into one bin.
--- tests/.gitignore | 6 +- tests/Makefile.am | 6 +- tests/NAMING-CONVENTION | 3 + tests/pc8.c | 822 -------------------------------------------- tests/pm_pc8.c | 822 ++++++++++++++++++++++++++++++++++++++++++++ tests/pm_rc6_residency.c | 121 +++++++ tests/pm_rps.c | 194 +++++++++++ tests/sysfs_rc6_residency.c | 121 ------- tests/sysfs_rps.c | 194 ----------- 9 files changed, 1146 insertions(+), 1143 deletions(-) delete mode 100644 tests/pc8.c create mode 100644 tests/pm_pc8.c create mode 100644 tests/pm_rc6_residency.c create mode 100644 tests/pm_rps.c delete mode 100644 tests/sysfs_rc6_residency.c delete mode 100644 tests/sysfs_rps.c
tests/.gitignore +3 -3
@@ -106,13 +106,13 @@ kms_cursor_crc kms_flip kms_render kms_setmode -pc8 +pm_pc8 +pm_rc6_residency +pm_rps prime_nv_api prime_nv_pcopy prime_nv_test prime_self_import prime_udl -sysfs_rc6_residency -sysfs_rps template testdisplay
tests/Makefile.am +3 -3
@@ -57,7 +57,7 @@ TESTS_progs_M = \ kms_render \ kms_setmode \ $(NOUVEAU_TESTS_M) \ - pc8 \ + pm_pc8 \ prime_self_import \ template \ $(NULL)
@@ -120,8 +120,8 @@ TESTS_progs = \ getstats \ getversion \ prime_udl \ - sysfs_rc6_residency \ - sysfs_rps \ + pm_rc6_residency \ + pm_rps \ $(NULL) # IMPORTANT: The ZZ_ tests need to be run last!
tests/NAMING-CONVENTION +3 -0
@@ -19,6 +19,9 @@ dri3/wayland) and actual multi-gpu tests. drv_: Tests for overall driver behaviour like module reload, s/r, debugfs files. +pm_: Tests for power management features like runtime PM, tuning knobs in sysfs +and also performance tuning features. + gen3_: Used by Chris' gen3 specific tiling/fencing tests. Generally tests that only run on some platforms don't have a specific prefix but just skip on platforms where the test doesn't apply.
tests/pc8.c deleted +0 -822
822 lines not on this page · raw message
tests/pm_pc8.c new file +822 -0
822 lines not on this page · raw message
tests/pm_rc6_residency.c new file +121 -0
121 lines not on this page · raw message
tests/pm_rps.c new file +194 -0
194 lines not on this page · raw message
tests/sysfs_rc6_residency.c deleted +0 -121
121 lines not on this page · raw message
tests/sysfs_rps.c deleted +0 -194
194 lines not on this page · raw message
Signature · 6 lines
1.8.4.rc3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/5 tests: Use kms_ prefix a bit more
In reply to Daniel VetterI was a bit on the fence about the basic pipe CRC test since that doesn't really test kms, but debug infrastructure in debugfs.
Otoh running this one for a full kms testrun is always good, to make sure that all the other (real) CRC based tests work sanely.
--- tests/.gitignore | 8 +- tests/Makefile.am | 4 +- tests/debugfs_pipe_crc.c | 262 -------------------------------------------- tests/kms_pipe_crc_basic.c | 262 ++++++++++++++++++++++++++++++++++++++++++++ tests/kms_sysfs_edid_timing | 25 +++++ tests/sysfs_edid_timing | 25 ----- 6 files changed, 293 insertions(+), 293 deletions(-) delete mode 100644 tests/debugfs_pipe_crc.c create mode 100644 tests/kms_pipe_crc_basic.c create mode 100755 tests/kms_sysfs_edid_timing delete mode 100755 tests/sysfs_edid_timing
tests/.gitignore +4 -4
@@ -1,6 +1,8 @@ # Please keep sorted alphabetically +core_getclient +core_getstats +core_getversion ddi_compute_wrpll -debugfs_pipe_crc drv_suspend drm_get_client_auth drm_vma_limiter
@@ -93,9 +95,6 @@ gen3_render_linear_blits gen3_render_mixed_blits gen3_render_tiledx_blits gen3_render_tiledy_blits -getclient -getstats -getversion igt_fork_helper igt_list_only igt_no_exit
@@ -104,6 +103,7 @@ igt_no_subtest kms_addfb kms_cursor_crc kms_flip +kms_pipe_crc_basic kms_render kms_setmode pm_pc8
tests/Makefile.am +2 -2
@@ -17,7 +17,6 @@ NOUVEAU_TESTS_M = \ endif TESTS_progs_M = \ - debugfs_pipe_crc \ drv_suspend \ gem_basic \ gem_caching \
@@ -54,6 +53,7 @@ TESTS_progs_M = \ kms_addfb \ kms_cursor_crc \ kms_flip \ + kms_pipe_crc_basic \ kms_render \ kms_setmode \ $(NOUVEAU_TESTS_M) \
@@ -135,7 +135,7 @@ TESTS_scripts = \ drv_hangman \ drv_missed_irq_hang \ drv_module_reload \ - sysfs_edid_timing \ + kms_sysfs_edid_timing \ sysfs_l3_parity \ test_rte_check \ tools_test \
tests/debugfs_pipe_crc.c deleted +0 -262
262 lines not on this page · raw message
tests/kms_pipe_crc_basic.c new file +262 -0
262 lines not on this page · raw message
tests/kms_sysfs_edid_timing new file +25 -0
@@ -0,0 +1,25 @@ +#!/bin/bash +# +# This check the time we take to read the content of all the possible connectors. +# Without the edid -ENXIO patch (http://permalink.gmane.org/gmane.comp.video.dri.devel/62083), +# we sometimes take a *really* long time. So let's just check for some reasonable timing here +# + +DRM_LIB_ALLOW_NO_MASTER=1 + +SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )" +. $SOURCE_DIR/drm_lib.sh + +TIME1=$(date +%s%N) +cat $(find /sys/devices/|grep drm | grep /status) > /dev/null +TIME2=$(date +%s%N) + +# time in ms +RES=$(((TIME2 - TIME1) / 1000000)) + +if [ $RES -gt 600 ]; then + echo "Talking to outputs took ${RES}ms, something is wrong" + exit 1 +fi + +exit 0
tests/sysfs_edid_timing deleted +0 -25
@@ -1,25 +0,0 @@ -#!/bin/bash -# -# This check the time we take to read the content of all the possible connectors. -# Without the edid -ENXIO patch (http://permalink.gmane.org/gmane.comp.video.dri.devel/62083), -# we sometimes take a *really* long time. So let's just check for some reasonable timing here -# - -DRM_LIB_ALLOW_NO_MASTER=1 - -SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )" -. $SOURCE_DIR/drm_lib.sh - -TIME1=$(date +%s%N) -cat $(find /sys/devices/|grep drm | grep /status) > /dev/null -TIME2=$(date +%s%N) - -# time in ms -RES=$(((TIME2 - TIME1) / 1000000)) - -if [ $RES -gt 600 ]; then - echo "Talking to outputs took ${RES}ms, something is wrong" - exit 1 -fi - -exit 0
Signature · 6 lines
1.8.4.rc3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/5 tests: establish core_ prefix
In reply to Daniel Vetter--- tests/Makefile.am | 6 ++--- tests/NAMING-CONVENTION | 2 ++ tests/core_getclient.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/core_getstats.c | 50 ++++++++++++++++++++++++++++++++++++++++ tests/core_getversion.c | 49 +++++++++++++++++++++++++++++++++++++++ tests/getclient.c | 61 ------------------------------------------------- tests/getstats.c | 50 ---------------------------------------- tests/getversion.c | 49 --------------------------------------- 8 files changed, 165 insertions(+), 163 deletions(-) create mode 100644 tests/core_getclient.c create mode 100644 tests/core_getstats.c create mode 100644 tests/core_getversion.c delete mode 100644 tests/getclient.c delete mode 100644 tests/getstats.c delete mode 100644 tests/getversion.c
tests/Makefile.am +3 -3
@@ -63,6 +63,9 @@ TESTS_progs_M = \ $(NULL) TESTS_progs = \ + core_getclient \ + core_getstats \ + core_getversion \ drm_get_client_auth \ drm_vma_limiter \ drm_vma_limiter_cached \
@@ -116,9 +119,6 @@ TESTS_progs = \ gen3_render_mixed_blits \ gen3_render_tiledx_blits \ gen3_render_tiledy_blits \ - getclient \ - getstats \ - getversion \ prime_udl \ pm_rc6_residency \ pm_rps \
tests/NAMING-CONVENTION +2 -0
@@ -7,6 +7,8 @@ naming scheme for tests and subtests. Test Prefixes ------------- +core_: Test for core drm ioctls and behaviour. + kms_: Used for modesetting tests. drm_: Tests for libdrm behaviour, currently just testing the buffer cache
tests/core_getclient.c new file +61 -0
61 lines not on this page · raw message
tests/core_getstats.c new file +50 -0
50 lines not on this page · raw message
tests/core_getversion.c new file +49 -0
49 lines not on this page · raw message
tests/getclient.c deleted +0 -61
61 lines not on this page · raw message
tests/getstats.c deleted +0 -50
50 lines not on this page · raw message
tests/getversion.c deleted +0 -49
49 lines not on this page · raw message
Signature · 6 lines
1.8.4.rc3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Daniel Vetter
Hi all,
Spurred by the ongoing discussions about improving our tests I've started to document some of the naming patterns a bit. I've also added a few new ones and renamed a bunch of tests.
The idea is that developers can use this patterns to construct add-hoc test groups with piglit's -t/-x options. I hope this here is a good start, but we certainly need to refine the patterns and test names over time.
Quoted 7 lines
To ensure that we have sufficient coherency I propose the following rules:
- If you add a large pile of new tests please document any new tests patterns in tests/NAMING-CONVENTIONS.
- Any patches that are relevant for the test naming conventions must be posted to intel-gfx to keep everyone in the loop.Comments and ideas both on the patches and process highly welcome.
Ok I've pushed this after a bit of irc chatting. Please have a look at the naming convention when writing new tests (or subtests). And if you see some room to clarify things, patches (to intel-gfx) highly welcome. -Daniel
Quoted 72 lines
Cheeers, Daniel
Daniel Vetter (5):
tests: Start to document naming conventions
tests: estbalishdrv_prefix
tests: establishpm_prefix
tests: Usekms_prefix a bit more
tests: establishcore_prefixREADME | 3 + tests/.gitignore | 16 +- tests/Makefile.am | 26 +- tests/NAMING-CONVENTION | 63 ++++ tests/ZZ_hangman | 70 ---- tests/ZZ_missed_irq | 72 ---- tests/core_getclient.c | 61 ++++ tests/core_getstats.c | 50 +++ tests/core_getversion.c | 49 +++ tests/debugfs_pipe_crc.c | 262 -------------- tests/debugfs_reader | 9 - tests/drv_debugfs_reader | 9 + tests/drv_hangman | 70 ++++ tests/drv_missed_irq_hang | 72 ++++ tests/drv_module_reload | 50 +++ tests/drv_suspend.c | 171 +++++++++ tests/gem_suspend.c | 171 --------- tests/getclient.c | 61 ---- tests/getstats.c | 50 --- tests/getversion.c | 49 --- tests/kms_pipe_crc_basic.c | 262 ++++++++++++++ tests/kms_sysfs_edid_timing | 25 ++ tests/module_reload | 50 --- tests/pc8.c | 822 -------------------------------------------- tests/pm_pc8.c | 822 ++++++++++++++++++++++++++++++++++++++++++++ tests/pm_rc6_residency.c | 121 +++++++ tests/pm_rps.c | 194 +++++++++++ tests/sysfs_edid_timing | 25 -- tests/sysfs_rc6_residency.c | 121 ------- tests/sysfs_rps.c | 194 ----------- 30 files changed, 2043 insertions(+), 1977 deletions(-) create mode 100644 tests/NAMING-CONVENTION delete mode 100755 tests/ZZ_hangman delete mode 100755 tests/ZZ_missed_irq create mode 100644 tests/core_getclient.c create mode 100644 tests/core_getstats.c create mode 100644 tests/core_getversion.c delete mode 100644 tests/debugfs_pipe_crc.c delete mode 100755 tests/debugfs_reader create mode 100755 tests/drv_debugfs_reader create mode 100755 tests/drv_hangman create mode 100755 tests/drv_missed_irq_hang create mode 100755 tests/drv_module_reload create mode 100644 tests/drv_suspend.c delete mode 100644 tests/gem_suspend.c delete mode 100644 tests/getclient.c delete mode 100644 tests/getstats.c delete mode 100644 tests/getversion.c create mode 100644 tests/kms_pipe_crc_basic.c create mode 100755 tests/kms_sysfs_edid_timing delete mode 100755 tests/module_reload delete mode 100644 tests/pc8.c create mode 100644 tests/pm_pc8.c create mode 100644 tests/pm_rc6_residency.c create mode 100644 tests/pm_rps.c delete mode 100755 tests/sysfs_edid_timing delete mode 100644 tests/sysfs_rc6_residency.c delete mode 100644 tests/sysfs_rps.cSignature · 1 line
1.8.4.rc3
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch