[i-g-t] testplan: Testplan for kms BAT tests

Bhanuprakash Modem bhanuprakash.modem at intel.com
Wed Apr 26 16:59:58 UTC 2023


Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 docs/testplan/conf.py                         |   2 +-
 docs/testplan/meson.build                     |  10 +-
 scripts/test_list.py                          |  15 +-
 tests/chamelium/kms_chamelium_edid.c          |  27 ++++
 tests/chamelium/kms_chamelium_frames.c        |  22 +++
 tests/chamelium/kms_chamelium_hpd.c           |  39 +++++
 tests/{i915 => intel_kms}/kms_big_fb.c        |   0
 tests/{i915 => intel_kms}/kms_big_joiner.c    |   0
 tests/{i915 => intel_kms}/kms_busy.c          |   0
 tests/{i915 => intel_kms}/kms_ccs.c           |   0
 tests/{i915 => intel_kms}/kms_cdclk.c         |   0
 tests/{i915 => intel_kms}/kms_draw_crc.c      |   0
 tests/{i915 => intel_kms}/kms_dsc.c           |   0
 tests/{i915 => intel_kms}/kms_dsc_helper.c    |   0
 tests/{i915 => intel_kms}/kms_dsc_helper.h    |   0
 tests/{i915 => intel_kms}/kms_fbcon_fbt.c     |   0
 .../{i915 => intel_kms}/kms_fence_pin_leak.c  |   0
 .../{i915 => intel_kms}/kms_flip_scaled_crc.c |   0
 tests/{i915 => intel_kms}/kms_flip_tiling.c   |   0
 .../kms_frontbuffer_tracking.c                |   0
 .../{i915 => intel_kms}/kms_legacy_colorkey.c |   0
 .../{i915 => intel_kms}/kms_mmap_write_crc.c  |   0
 tests/{i915 => intel_kms}/kms_pipe_b_c_ivb.c  |   0
 tests/{i915 => intel_kms}/kms_psr.c           |  31 ++++
 tests/{i915 => intel_kms}/kms_psr2_sf.c       |   0
 tests/{i915 => intel_kms}/kms_psr2_su.c       |   0
 .../{i915 => intel_kms}/kms_psr_stress_test.c |   0
 tests/{i915 => intel_kms}/kms_pwrite_crc.c    |   0
 tests/intel_kms/kms_test_config.json          |  39 +++++
 tests/kms_addfb_basic.c                       | 147 ++++++++++++++++++
 tests/kms_cursor_legacy.c                     |  44 ++++++
 tests/kms_flip.c                              |  27 ++++
 tests/kms_force_connector_basic.c             |  29 ++++
 tests/kms_pipe_crc_basic.c                    |  58 +++++++
 tests/kms_prop_blob.c                         |  12 ++
 tests/meson.build                             |  25 ++-
 tests/xe/xe_test_config.json                  |   1 +
 37 files changed, 515 insertions(+), 13 deletions(-)
 rename tests/{i915 => intel_kms}/kms_big_fb.c (100%)
 rename tests/{i915 => intel_kms}/kms_big_joiner.c (100%)
 rename tests/{i915 => intel_kms}/kms_busy.c (100%)
 rename tests/{i915 => intel_kms}/kms_ccs.c (100%)
 rename tests/{i915 => intel_kms}/kms_cdclk.c (100%)
 rename tests/{i915 => intel_kms}/kms_draw_crc.c (100%)
 rename tests/{i915 => intel_kms}/kms_dsc.c (100%)
 rename tests/{i915 => intel_kms}/kms_dsc_helper.c (100%)
 rename tests/{i915 => intel_kms}/kms_dsc_helper.h (100%)
 rename tests/{i915 => intel_kms}/kms_fbcon_fbt.c (100%)
 rename tests/{i915 => intel_kms}/kms_fence_pin_leak.c (100%)
 rename tests/{i915 => intel_kms}/kms_flip_scaled_crc.c (100%)
 rename tests/{i915 => intel_kms}/kms_flip_tiling.c (100%)
 rename tests/{i915 => intel_kms}/kms_frontbuffer_tracking.c (100%)
 rename tests/{i915 => intel_kms}/kms_legacy_colorkey.c (100%)
 rename tests/{i915 => intel_kms}/kms_mmap_write_crc.c (100%)
 rename tests/{i915 => intel_kms}/kms_pipe_b_c_ivb.c (100%)
 rename tests/{i915 => intel_kms}/kms_psr.c (95%)
 rename tests/{i915 => intel_kms}/kms_psr2_sf.c (100%)
 rename tests/{i915 => intel_kms}/kms_psr2_su.c (100%)
 rename tests/{i915 => intel_kms}/kms_psr_stress_test.c (100%)
 rename tests/{i915 => intel_kms}/kms_pwrite_crc.c (100%)
 create mode 100644 tests/intel_kms/kms_test_config.json

diff --git a/docs/testplan/conf.py b/docs/testplan/conf.py
index a73ad99b09b..a7db5c3a230 100644
--- a/docs/testplan/conf.py
+++ b/docs/testplan/conf.py
@@ -68,5 +68,5 @@ htmlhelp_basename = 'IGT'
 
 # rst2pdf
 pdf_documents = [
-    ('index', u'xe_tests', u'IGT Xe Tests', u'IGT authors'),
+    ('index', u'tests', u'IGT Xe Tests', u'IGT authors'),
 ]
diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build
index 3347f61876e..5a85af115d0 100644
--- a/docs/testplan/meson.build
+++ b/docs/testplan/meson.build
@@ -7,6 +7,7 @@ rst2pdf = find_program('rst2pdf', required: false)
 stylesheet = join_paths(meson.current_source_dir(), 'testplan.css')
 
 xe_test_config = join_paths(source_root, 'tests', 'xe', 'xe_test_config.json')
+kms_test_config = join_paths(source_root, 'tests', 'intel_kms', 'kms_test_config.json')
 
 check_testlist = []
 if build_tests
@@ -17,8 +18,9 @@ else
 	doc_dependencies = []
 endif
 
-test_dict = { 'xe_tests':
-		{ 'input': xe_test_config, 'extra_args': check_testlist }
+test_dict = {
+	      'xe_tests': { 'input': xe_test_config, 'extra_args': check_testlist },
+	      'kms_tests': { 'input': kms_test_config, 'extra_args': check_testlist }
 	    }
 
 foreach testplan, fields: test_dict
@@ -63,14 +65,14 @@ if sphinx.found()
 	if rst2pdf.found()
 		sphinx_out_pdf = meson.current_build_dir() + '/pdf'
 
-		custom_target('xe_tests.pdf',
+		custom_target('tests.pdf',
 			      build_by_default : true,
 			      command : [ 'sphinx-build', '-c', meson.current_source_dir(),
 					  '-b', 'pdf',
 					  '-D', 'version=' + meson.project_version(),
 					  meson.current_build_dir(), sphinx_out_pdf],
 			      input : index_rst,
-			      output : 'xe_tests.pdf'
+			      output : 'tests.pdf'
 			     )
 	endif
 endif
diff --git a/scripts/test_list.py b/scripts/test_list.py
index 1c5e195eb9d..4ef39edb298 100755
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -250,6 +250,7 @@ class TestList:
         self.test_number = 0
         self.config = None
         self.filenames = file_list
+        self.ignorefiles = []
         self.plan_filenames = []
         self.props = {}
         self.config_fname = config_fname
@@ -313,6 +314,14 @@ class TestList:
                     if cfg_file:
                         has_implemented = True
 
+            if not self.ignorefiles:
+                self.ignorefiles = []
+                files = self.config["ignore_files"]
+                for cfg_file in files:
+                    cfg_file = os.path.realpath(os.path.dirname(config_fname)) + "/" + cfg_file
+                    for fname in glob.glob(cfg_file):
+                        self.ignorefiles.append(fname)
+
             has_planned = False
             if include_plan and "planning_files" in self.config:
                 implemented_class = "Implemented"
@@ -829,7 +838,8 @@ class TestList:
         """ Return a list of tests as reported by --list-subtests """
         tests = []
         for name in self.filenames:
-            tests += self.__get_testlist(name)
+            if name not in self.ignorefiles:
+                tests += self.__get_testlist(name)
 
         return sorted(tests)
 
@@ -890,7 +900,8 @@ class TestList:
         if run_missing:
             for test_name in run_missing:
                 print(f'Warning: Missing documentation for {test_name}')
-        if doc_uneeded or run_missing:
+
+        if doc_uneeded:
             sys.exit(1)
 
     #
diff --git a/tests/chamelium/kms_chamelium_edid.c b/tests/chamelium/kms_chamelium_edid.c
index 7e7262ed372..4a52e692218 100644
--- a/tests/chamelium/kms_chamelium_edid.c
+++ b/tests/chamelium/kms_chamelium_edid.c
@@ -24,6 +24,11 @@
  *    Lyude Paul <lyude at redhat.com>
  */
 
+/**
+ * TEST: Tests behaviour of edid & timings using chamelium
+ * Category: Display
+ */
+
 #include <fcntl.h>
 #include <stdint.h>
 #include <string.h>
@@ -139,6 +144,28 @@ static void check_mode(struct chamelium *chamelium, struct chamelium_port *port,
 	igt_assert(video_params.vsync_polarity == mode_vsync_polarity);
 }
 
+/**
+ * SUBTEST: dp-edid-read
+ * Description: Make sure the EDID exposed by KMS is the same as the screen's
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: dp
+ * Mega feature: DP
+ *
+ * SUBTEST: hdmi-edid-read
+ * Description: Make sure the EDID exposed by KMS is the same as the screen's
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: hdmi
+ * Mega feature: HDMI
+ *
+ * SUBTEST: vga-edid-read
+ * Description: Make sure the EDID exposed by KMS is the same as the screen's
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: vga
+ * Mega feature: VGA
+ */
 static const char igt_custom_edid_type_read_desc[] =
 	"Make sure the EDID exposed by KMS is the same as the screen's";
 static void igt_custom_edid_type_read(chamelium_data_t *data,
diff --git a/tests/chamelium/kms_chamelium_frames.c b/tests/chamelium/kms_chamelium_frames.c
index 008bc34b6f1..22a7ba936dd 100644
--- a/tests/chamelium/kms_chamelium_frames.c
+++ b/tests/chamelium/kms_chamelium_frames.c
@@ -24,6 +24,11 @@
  *    Lyude Paul <lyude at redhat.com>
  */
 
+/**
+ * TEST: Tests to capture frames using chamelium
+ * Category: Display
+ */
+
 #include "igt_eld.h"
 #include "igt_infoframe.h"
 #include "kms_chamelium_helper.h"
@@ -534,6 +539,23 @@ static void prepare_randomized_plane(chamelium_data_t *data,
 	igt_remove_fb(data->drm_fd, &pattern_fb);
 }
 
+/**
+ * SUBTEST: dp-crc-fast
+ * Description: Pick the first mode of the IGT base EDID, display and capture
+ * 		a few frames, then check captured frames are correct
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: dp
+ * Mega feature: DP
+ *
+ * SUBTEST: hdmi-crc-fast
+ * Description: Pick the first mode of the IGT base EDID, display and capture
+ * 		a few frames, then check captured frames are correct
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: hdmi
+ * Mega feature: HDMI
+ */
 static const char test_display_one_mode_desc[] =
 	"Pick the first mode of the IGT base EDID, display and capture a few "
 	"frames, then check captured frames are correct";
diff --git a/tests/chamelium/kms_chamelium_hpd.c b/tests/chamelium/kms_chamelium_hpd.c
index 2b17ce29d18..efd40ba5411 100644
--- a/tests/chamelium/kms_chamelium_hpd.c
+++ b/tests/chamelium/kms_chamelium_hpd.c
@@ -24,6 +24,11 @@
  *    Lyude Paul <lyude at redhat.com>
  */
 
+/**
+ * TEST: Tests behaviour of hpd using chamelium
+ * Category: Display
+ */
+
 #include "kms_chamelium_helper.h"
 
 #define HPD_STORM_PULSE_INTERVAL_DP 100 /* ms */
@@ -104,6 +109,31 @@ static void try_suspend_resume_hpd(chamelium_data_t *data,
 	}
 }
 
+/**
+ * SUBTEST: dp-hpd-fast
+ * Description: Check that we get uevents and updated connector status on
+ * 		hotplug and unplug
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: dp_hotplug
+ * Mega feature: DP
+ *
+ * SUBTEST: hdmi-hpd-fast
+ * Description: Check that we get uevents and updated connector status on
+ * 		hotplug and unplug
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: hdmi_hotplug
+ * Mega feature: HDMI
+ *
+ * SUBTEST: vga-hpd-fast
+ * Description: Check that we get uevents and updated connector status on
+ * 		hotplug and unplug
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: vga_hotplug
+ * Mega feature: VGA
+ */
 static const char test_basic_hotplug_desc[] =
 	"Check that we get uevents and updated connector status on "
 	"hotplug and unplug";
@@ -238,6 +268,15 @@ static void test_suspend_resume_hpd(chamelium_data_t *data,
 	igt_cleanup_uevents(mon);
 }
 
+/**
+ * SUBTEST: common-hpd-after-suspend
+ * Description: Toggle HPD during suspend on all connectors, check that uevents
+ * 		are sent and connector status is updated
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: hotplug
+ * Mega feature: General Display Features
+ */
 static const char test_suspend_resume_hpd_common_desc[] =
 	"Toggle HPD during suspend on all connectors, check that uevents are "
 	"sent and connector status is updated";
diff --git a/tests/i915/kms_big_fb.c b/tests/intel_kms/kms_big_fb.c
similarity index 100%
rename from tests/i915/kms_big_fb.c
rename to tests/intel_kms/kms_big_fb.c
diff --git a/tests/i915/kms_big_joiner.c b/tests/intel_kms/kms_big_joiner.c
similarity index 100%
rename from tests/i915/kms_big_joiner.c
rename to tests/intel_kms/kms_big_joiner.c
diff --git a/tests/i915/kms_busy.c b/tests/intel_kms/kms_busy.c
similarity index 100%
rename from tests/i915/kms_busy.c
rename to tests/intel_kms/kms_busy.c
diff --git a/tests/i915/kms_ccs.c b/tests/intel_kms/kms_ccs.c
similarity index 100%
rename from tests/i915/kms_ccs.c
rename to tests/intel_kms/kms_ccs.c
diff --git a/tests/i915/kms_cdclk.c b/tests/intel_kms/kms_cdclk.c
similarity index 100%
rename from tests/i915/kms_cdclk.c
rename to tests/intel_kms/kms_cdclk.c
diff --git a/tests/i915/kms_draw_crc.c b/tests/intel_kms/kms_draw_crc.c
similarity index 100%
rename from tests/i915/kms_draw_crc.c
rename to tests/intel_kms/kms_draw_crc.c
diff --git a/tests/i915/kms_dsc.c b/tests/intel_kms/kms_dsc.c
similarity index 100%
rename from tests/i915/kms_dsc.c
rename to tests/intel_kms/kms_dsc.c
diff --git a/tests/i915/kms_dsc_helper.c b/tests/intel_kms/kms_dsc_helper.c
similarity index 100%
rename from tests/i915/kms_dsc_helper.c
rename to tests/intel_kms/kms_dsc_helper.c
diff --git a/tests/i915/kms_dsc_helper.h b/tests/intel_kms/kms_dsc_helper.h
similarity index 100%
rename from tests/i915/kms_dsc_helper.h
rename to tests/intel_kms/kms_dsc_helper.h
diff --git a/tests/i915/kms_fbcon_fbt.c b/tests/intel_kms/kms_fbcon_fbt.c
similarity index 100%
rename from tests/i915/kms_fbcon_fbt.c
rename to tests/intel_kms/kms_fbcon_fbt.c
diff --git a/tests/i915/kms_fence_pin_leak.c b/tests/intel_kms/kms_fence_pin_leak.c
similarity index 100%
rename from tests/i915/kms_fence_pin_leak.c
rename to tests/intel_kms/kms_fence_pin_leak.c
diff --git a/tests/i915/kms_flip_scaled_crc.c b/tests/intel_kms/kms_flip_scaled_crc.c
similarity index 100%
rename from tests/i915/kms_flip_scaled_crc.c
rename to tests/intel_kms/kms_flip_scaled_crc.c
diff --git a/tests/i915/kms_flip_tiling.c b/tests/intel_kms/kms_flip_tiling.c
similarity index 100%
rename from tests/i915/kms_flip_tiling.c
rename to tests/intel_kms/kms_flip_tiling.c
diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/intel_kms/kms_frontbuffer_tracking.c
similarity index 100%
rename from tests/i915/kms_frontbuffer_tracking.c
rename to tests/intel_kms/kms_frontbuffer_tracking.c
diff --git a/tests/i915/kms_legacy_colorkey.c b/tests/intel_kms/kms_legacy_colorkey.c
similarity index 100%
rename from tests/i915/kms_legacy_colorkey.c
rename to tests/intel_kms/kms_legacy_colorkey.c
diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/intel_kms/kms_mmap_write_crc.c
similarity index 100%
rename from tests/i915/kms_mmap_write_crc.c
rename to tests/intel_kms/kms_mmap_write_crc.c
diff --git a/tests/i915/kms_pipe_b_c_ivb.c b/tests/intel_kms/kms_pipe_b_c_ivb.c
similarity index 100%
rename from tests/i915/kms_pipe_b_c_ivb.c
rename to tests/intel_kms/kms_pipe_b_c_ivb.c
diff --git a/tests/i915/kms_psr.c b/tests/intel_kms/kms_psr.c
similarity index 95%
rename from tests/i915/kms_psr.c
rename to tests/intel_kms/kms_psr.c
index 0e8d7f4f0fe..6c89de45d53 100644
--- a/tests/i915/kms_psr.c
+++ b/tests/intel_kms/kms_psr.c
@@ -22,6 +22,11 @@
  *
  */
 
+/**
+ * TEST: Tests behaviour of PSR & PSR2
+ * Category: Display
+ */
+
 #include "igt.h"
 #include "igt_sysfs.h"
 #include "igt_psr.h"
@@ -300,6 +305,32 @@ static void fb_dirty_fb_ioctl(data_t *data, struct igt_fb *fb)
 	igt_assert(ret == 0 || ret == -ENOSYS);
 }
 
+/**
+ * SUBTEST: cursor_plane_move
+ * Description: Check if psr is detecting the plane operations performed on
+ *		cursor planes
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: psr
+ * Mega feature: PSR
+ *
+ * SUBTEST: primary_page_flip
+ * Description: Check if psr is detecting page-flipping operations performed
+ *		on primary planes
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: psr
+ * Mega feature: PSR
+ *
+ * SUBTEST: sprite_plane_onoff
+ * Description: Check if psr is detecting the plane operations performed on
+ *		sprite planes
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: psr
+ * Mega feature: PSR
+ */
+
 static void run_test(data_t *data)
 {
 	uint32_t handle = data->fb_white.gem_handle;
diff --git a/tests/i915/kms_psr2_sf.c b/tests/intel_kms/kms_psr2_sf.c
similarity index 100%
rename from tests/i915/kms_psr2_sf.c
rename to tests/intel_kms/kms_psr2_sf.c
diff --git a/tests/i915/kms_psr2_su.c b/tests/intel_kms/kms_psr2_su.c
similarity index 100%
rename from tests/i915/kms_psr2_su.c
rename to tests/intel_kms/kms_psr2_su.c
diff --git a/tests/i915/kms_psr_stress_test.c b/tests/intel_kms/kms_psr_stress_test.c
similarity index 100%
rename from tests/i915/kms_psr_stress_test.c
rename to tests/intel_kms/kms_psr_stress_test.c
diff --git a/tests/i915/kms_pwrite_crc.c b/tests/intel_kms/kms_pwrite_crc.c
similarity index 100%
rename from tests/i915/kms_pwrite_crc.c
rename to tests/intel_kms/kms_pwrite_crc.c
diff --git a/tests/intel_kms/kms_test_config.json b/tests/intel_kms/kms_test_config.json
new file mode 100644
index 00000000000..d61e42082d4
--- /dev/null
+++ b/tests/intel_kms/kms_test_config.json
@@ -0,0 +1,39 @@
+{
+    "description": "JSON file to be used to parse Xe documentation",
+    "files": [ "../chamelium/kms_chamelium_*.c", "../kms_*.c",
+	       "../testdisplay.c", "kms_*.c" ],
+    "ignore_files": ["../chamelium/kms_chamelium_helper.c", "../kms_color_helper.c",
+                     "kms_dsc_helper.c"],
+    "fields": {
+        "Category": {
+            "_properties_": {
+                "description": "Contains the major group for the tested functionality 'Display'"
+            }
+        },
+        "Mega feature": {
+            "_properties_": {
+                "description": "Contains the mega feature for end to end use case, e.g. the 'PSR' feature."
+            }
+        },
+        "Functionality": {
+            "_properties_": {
+                "description": "Groups page table tests on buckets containg more detailed functionality"
+            }
+        },
+        "Run type": {
+            "_properties_": {
+                "description": "Defines what category of testlist it belongs"
+            }
+        },
+        "Test category": {
+            "_properties_": {
+                "description": "Defines the test category. Usually used at subtest level."
+            }
+        },
+        "Description" : {
+            "_properties_": {
+                "description": "Provides a description for the test/subtest."
+            }
+        }
+    }
+}
diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index e4783624fc4..6f77c19de12 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -25,6 +25,11 @@
  *
  */
 
+/**
+ * TEST: Sanity test for ioctls DRM_IOCTL_MODE_ADDFB2 & DRM_IOCTL_MODE_RMFB.
+ * Category: Display
+ */
+
 #include "igt.h"
 #include <unistd.h>
 #include <stdlib.h>
@@ -60,6 +65,35 @@ static int legacy_addfb(int fd, struct drm_mode_fb_cmd *arg)
 	return err;
 }
 
+/**
+ * SUBTEST: unused-handle
+ * Description: Test that addfb2 call fails correctly for unused handle
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: unused-pitches
+ * Description: Test that addfb2 call fails correctly for unused pitches
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: unused-offsets
+ * Description: Test that addfb2 call fails correctly for unused offset
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: unused-modifier
+ * Description: Test that addfb2 call fails correctly for unused modifier
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ */
 static void invalid_tests(int fd)
 {
 	struct drm_mode_fb_cmd2 f = {};
@@ -273,6 +307,39 @@ static void invalid_tests(int fd)
 	}
 }
 
+/**
+ * SUBTEST: no-handle
+ * Description: Test that addfb2 call fails correctly without handle
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: basic
+ * Description: Check if addfb2 call works with given handle
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: bad-pitch-%i
+ * Description: bad-pitch-%arg[1]: Test that addfb2 call fails correctly for bad-pitches
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * arg[1]:
+ *
+ * @0:          0
+ * @32:         32
+ * @63:         63
+ * @128:        128
+ * @256:        256
+ * @999:        999
+ * @1024:       1024
+ * @65536:      65536
+ */
 static void pitch_tests(int fd)
 {
 	struct drm_mode_fb_cmd2 f = {};
@@ -399,6 +466,42 @@ static void tiling_tests(int fd)
 	}
 }
 
+/**
+ * SUBTEST: size-max
+ * Description: Check if addfb2 call works with max size of buffer object
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: too-wide
+ * Description: Test that addfb2 call fails correctly with increased width of fb
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: too-high
+ * Description: Test that addfb2 call fails correctly with increased height of fb
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: bo-too-small
+ * Description: Test that addfb2 call fails correctly with small size of buffer object
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: small-bo
+ * Description: Check if addfb2 call works for given height
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ */
 static void size_tests(int fd)
 {
 	struct drm_mode_fb_cmd2 f = {};
@@ -514,6 +617,21 @@ static void size_tests(int fd)
 	}
 }
 
+/**
+ * SUBTEST: addfb25-modifier-no-flag
+ * Description: Test that addfb2 call fails correctly for x-tiling with given modifier
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: addfb25-bad-modifier
+ * Description: Test that addfb2 call fails correctly for irrelevant modifier
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ */
 static void addfb25_tests(int fd)
 {
 	struct drm_mode_fb_cmd2 f = {};
@@ -700,6 +818,35 @@ static void addfb25_4tile(int fd)
 		gem_close(fd, gem_bo);
 }
 
+/**
+ * SUBTEST: invalid-get-prop-any
+ * Description: Test that get-properties ioctl call fails correctly for invalid object type
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: invalid-get-prop
+ * Description: Test that get-properties ioctl call fails correctly for fb mode object
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: invalid-set-prop-any
+ * Description: Test that set-properties ioctl call fails correctly for invalid object type
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: invalid-set-prop
+ * Description: Test that get-properties ioctl call fails correctly for fb mode object
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_gem_interop
+ * Mega feature: General Display Features
+ */
 static void prop_tests(int fd)
 {
 	struct drm_mode_fb_cmd2 f = {};
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 7df6a61257e..05085d60771 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -22,6 +22,11 @@
  *
  */
 
+/**
+ * TEST: Stress legacy cursor ioctl
+ * Category: Display
+ */
+
 #include <sched.h>
 #include <sys/poll.h>
 
@@ -536,6 +541,45 @@ enum basic_flip_cursor {
 
 #define BASIC_BUSY 0x1
 
+/**
+ * SUBTEST: basic-busy-flip-before-cursor-%s
+ * Description: Cursor test with %arg[1] mode
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: cursor
+ * Mega feature: General Display Features
+ *
+ * arg[1]:
+ *
+ * @atomic:	atomic
+ * @legacy:	legacy
+ *
+ * SUBTEST: basic-flip-after-cursor-%s
+ * Description: Cursor test with %arg[1] mode
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: cursor
+ * Mega feature: General Display Features
+ *
+ * arg[1]:
+ *
+ * @atomic:        atomic
+ * @legacy:        legacy
+ * @varying-size:  varying-size
+ *
+ * SUBTEST: basic-flip-before-cursor-%s
+ * Description: Cursor test with %arg[1] mode
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: cursor
+ * Mega feature: General Display Features
+ *
+ * arg[1]:
+ *
+ * @atomic:        atomic
+ * @legacy:        legacy
+ * @varying-size:  varying-size
+ */
 static void basic_flip_cursor(igt_display_t *display,
 			      enum flip_test mode,
 			      enum basic_flip_cursor order,
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index e4c98b8ec16..611d3fbe3b2 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -21,6 +21,11 @@
  * IN THE SOFTWARE.
  */
 
+/**
+ * TEST: Tests for validating modeset, dpms and pageflips
+ * Category: Display
+ */
+
 #include "config.h"
 
 #include "igt.h"
@@ -1557,6 +1562,28 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 		__run_test_on_crtc_set(o, crtc_idxs, crtc_count, duration_ms);
 }
 
+/**
+ * SUBTEST: basic-flip-vs-%s
+ * Description: Basic test for validating %arg[1]
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: vblank
+ * Mega feature: General Display Features
+ *
+ * arg[1]:
+ *
+ * @dpms:         dpms
+ * @modeset:      modeset
+ * @wf_vblank:    wf_vblank
+ *
+ * SUBTEST: basic-plain-flip
+ * Description: Basic test for validating page flip
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: vblank
+ * Mega feature: General Display Features
+ */
+
 static void run_test(int duration, int flags)
 {
 	struct test_output o;
diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c
index f1508efba16..7e35693cfe3 100644
--- a/tests/kms_force_connector_basic.c
+++ b/tests/kms_force_connector_basic.c
@@ -22,6 +22,11 @@
  *
  */
 
+/**
+ * TEST: Check the debugfs force connector/edid features work correctly
+ * Category: Display
+ */
+
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Check the debugfs force connector/edid features work"
@@ -151,6 +156,14 @@ static void force_load_detect(int drm_fd, drmModeConnectorPtr connector, drmMode
 	}
 }
 
+/**
+ * SUBTEST: force-connector-state
+ * Description: Test to check the forced connector state
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: force_connector
+ * Mega feature: General Display Features
+ */
 static void force_connector_state(int drm_fd, drmModeConnectorPtr connector)
 {
 	igt_display_t display;
@@ -190,6 +203,14 @@ static void force_connector_state(int drm_fd, drmModeConnectorPtr connector)
 	igt_display_fini(&display);
 }
 
+/**
+ * SUBTEST: force-edid
+ * Description: Test to check the values after forcing edid
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: force_connector
+ * Mega feature: General Display Features
+ */
 static void force_edid(int drm_fd, drmModeConnectorPtr connector)
 {
 	drmModeConnector *temp;
@@ -231,6 +252,14 @@ static void force_edid(int drm_fd, drmModeConnectorPtr connector)
 
 }
 
+/**
+ * SUBTEST: prune-stale-modes
+ * Description: Tests pruning of stale modes
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: force_connector
+ * Mega feature: General Display Features
+ */
 static void prune_stale_modes(int drm_fd, drmModeConnectorPtr connector)
 {
 	int i;
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 65afc9f607a..84c73fd7f4b 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -22,6 +22,11 @@
  *
  */
 
+/**
+ * TEST: Tests behaviour of CRC
+ * Category: Display
+ */
+
 #include "igt.h"
 #include "igt_sysfs.h"
 #include <errno.h>
@@ -80,6 +85,50 @@ enum {
 	TEST_HANG = 1 << 3,
 };
 
+/**
+ * SUBTEST: read-crc
+ * Description: Test for pipe CRC reads
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: crc
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: read-crc-frame-sequence
+ * Description: Tests the pipe CRC read and ensure frame sequence
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: crc
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: nonblocking-crc
+ * Description: Test for O_NONBLOCK CRC reads
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: crc
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: nonblocking-crc-frame-sequence
+ * Description: Test for O_NONBLOCK CRC reads and ensure frame sequence
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: crc
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: suspend-read-crc
+ * Description: Suspend test for pipe CRC reads
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: crc
+ * Mega feature: General Display Features
+ *
+ * SUBTEST: hang-read-crc
+ * Description: Hang test for pipe CRC read
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: crc
+ * Mega feature: General Display Features
+ */
+
 static void test_read_crc(data_t *data, enum pipe pipe,
 			  igt_output_t *output, unsigned flags)
 {
@@ -177,6 +226,15 @@ static void test_read_crc(data_t *data, enum pipe pipe,
 	igt_display_commit(display);
 }
 
+/**
+ * SUBTEST: compare-crc-sanitycheck
+ * Description: Basic sanity check for CRC mismatches
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: crc
+ * Mega feature: General Display Features
+ */
+
 /*
  * CRC-sanity test, to make sure there would be no CRC mismatches
  *
diff --git a/tests/kms_prop_blob.c b/tests/kms_prop_blob.c
index 96aa6d8d671..6a5a5f41071 100644
--- a/tests/kms_prop_blob.c
+++ b/tests/kms_prop_blob.c
@@ -25,6 +25,10 @@
  *   Daniel Stone <daniels at collabora.com>
  */
 
+/**
+ * TEST: Tests behaviour of mass-data 'blob' properties
+ * Category: Display
+ */
 #include "igt.h"
 #include <errno.h>
 #include <stdbool.h>
@@ -238,6 +242,14 @@ test_core(int fd)
 	igt_assert_eq(validate_prop(fd, 0), ENOENT);
 }
 
+/**
+ * SUBTEST: basic
+ * Description: Test to ensure property support exists
+ * Test category: functionality test
+ * Run type: BAT
+ * Functionality: kms_core
+ * Mega feature: General Display Features
+ */
 static void
 test_basic(int fd)
 {
diff --git a/tests/meson.build b/tests/meson.build
index 9072cfadc6b..1fd494fd635 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -217,6 +217,13 @@ i915_progs = [
 	'i915_query',
 	'i915_selftest',
 	'i915_suspend',
+	'sysfs_defaults',
+	'sysfs_heartbeat_interval',
+	'sysfs_preempt_timeout',
+	'sysfs_timeslice_duration',
+]
+
+intel_kms_progs = [
 	'kms_big_fb',
 	'kms_big_joiner' ,
 	'kms_busy',
@@ -235,10 +242,6 @@ i915_progs = [
 	'kms_psr2_su',
 	'kms_psr_stress_test',
 	'kms_pwrite_crc',
-	'sysfs_defaults',
-	'sysfs_heartbeat_interval',
-	'sysfs_preempt_timeout',
-	'sysfs_timeslice_duration',
 ]
 
 xe_progs = [
@@ -314,6 +317,16 @@ foreach prog : i915_progs
 	test_list += prog
 endforeach
 
+foreach prog : intel_kms_progs
+	test_executables += executable(prog,
+		   join_paths('intel_kms', prog + '.c'),
+		   dependencies : test_deps,
+		   install_dir : libexecdir,
+		   install_rpath : libexecdir_rpathdir,
+		   install : true)
+	test_list += prog
+endforeach
+
 foreach prog : xe_progs
 	test_executables += executable(prog,
 		   join_paths('xe', prog + '.c'),
@@ -472,7 +485,7 @@ test_executables += executable('kms_color',
 test_list += 'kms_color'
 
 test_executables += executable('kms_dsc',
-	   [ join_paths('i915', 'kms_dsc.c'), join_paths ('i915', 'kms_dsc_helper.c')],
+	   [ join_paths('intel_kms', 'kms_dsc.c'), join_paths ('intel_kms', 'kms_dsc_helper.c')],
 	   dependencies : test_deps,
 	   install_dir : libexecdir,
 	   install_rpath : libexecdir_rpathdir,
@@ -480,7 +493,7 @@ test_executables += executable('kms_dsc',
 test_list += 'kms_dsc'
 
 test_executables += executable('kms_psr2_sf',
-	   [ join_paths('i915', 'kms_psr2_sf.c'), join_paths ('i915', 'kms_dsc_helper.c')],
+	   [ join_paths('intel_kms', 'kms_psr2_sf.c'), join_paths ('intel_kms', 'kms_dsc_helper.c')],
 	   dependencies : test_deps,
 	   install_dir : libexecdir,
 	   install_rpath : libexecdir_rpathdir,
diff --git a/tests/xe/xe_test_config.json b/tests/xe/xe_test_config.json
index 666fe6cd315..ca32b203711 100644
--- a/tests/xe/xe_test_config.json
+++ b/tests/xe/xe_test_config.json
@@ -1,6 +1,7 @@
 {
     "description": "JSON file to be used to parse Xe documentation",
     "files": [ "xe_*.c" ],
+    "ignore_files": [],
     "fields": {
         "Category": {
             "_properties_": {
-- 
2.40.0



More information about the Intel-gfx-trybot mailing list