Skip to contentSkip to conversation

tests/kms: IGT test cleanup

PATCH New Nidhi Gupta 2 participants 4 messages Jun 10, 2022

lore
Share & tools
lore
#0 lore raw

cover tests/kms: IGT test cleanup

In below test, convert all possible subtests to dynamic and sanitize the system state before starting/exiting the subtest.

Nidhi Gupta (2):
tests/i915/kms_draw_crc.c: Convert test to dynamic tests/i915/kms_draw_crc: Test Cleanup

 tests/i915/kms_draw_crc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/2 tests/i915/kms_draw_crc.c: Convert test to dynamic

Covert the existing subtests to dynamic subtests.

---
 tests/i915/kms_draw_crc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/i915/kms_draw_crc.c +2 -2
index 33fefed4..3e68479e 100644
@@ -340,7 +340,7 @@ igt_main
 	for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
 		igt_describe("This subtest verfies igt_draw library works "
 			     "with different modifiers, DRM_FORMATS, DRAW_METHODS.");
-		igt_subtest_f("draw-method-%s-%s-%s",
+		igt_subtest_with_dynamic_f("draw-method-%s-%s-%s",
 			      format_str(format_idx),
 			      igt_draw_get_method_name(method),
 			      modifier_str(modifier_idx))
@@ -350,7 +350,7 @@ igt_main
 
 	igt_describe("This subtest verifies CRC after filling fb with x-tiling "
 		     "or none.");
-	igt_subtest("fill-fb")
+	igt_subtest_with_dynamic("fill-fb")
 		fill_fb_subtest();
 
 	igt_fixture
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 tests/i915/kms_draw_crc: Test Cleanup

In reply to Nidhi Gupta

Sanitize the system state before starting the subtest.

---
 tests/i915/kms_draw_crc.c | 1 +
 1 file changed, 1 insertion(+)
tests/i915/kms_draw_crc.c +1 -0
index 3e68479e..1c87e523 100644
@@ -265,6 +265,7 @@ static void setup_environment(void)
 	drm_fd = drm_open_driver_master(DRIVER_INTEL);
 	igt_require(drm_fd >= 0);
 
+	igt_display_reset(display);
 	drm_res = drmModeGetResources(drm_fd);
 	igt_require(drm_res);
 	igt_assert(drm_res->count_connectors <= MAX_CONNECTORS);
Signature · 1 line
2.26.2
#3 lore raw

[igt-dev] ✗ Fi.CI.BUILD: failure for tests/kms: IGT test cleanup

In reply to Nidhi Gupta
== Series Details ==

== Series Details ==

Series: tests/kms: IGT test cleanup
URL : https://patchwork.freedesktop.org/series/104958/
State : failure

== Summary ==

IGT patchset build failed on latest successful build 0189ca288f7188e60f5eda356b190040bf8ec704 i915/gem_pipe_control_store_loop: Adopt to softpin

[468/656] Linking target tests/gem_request_retire
[469/656] Linking target tests/gem_ringfill
[470/656] Linking target tests/gem_set_tiling_vs_blt
[471/656] Linking target tests/gem_set_tiling_vs_gtt
[472/656] Linking target tests/gem_set_tiling_vs_pwrite
[473/656] Linking target tests/gem_spin_batch
[474/656] Linking target tests/gem_shrink
[475/656] Linking target tests/gem_softpin
[476/656] Linking target tests/gem_tiled_partial_pwrite_pread
[477/656] Linking target tests/gem_streaming_writes
[478/656] Linking target tests/gem_sync
[479/656] Linking target tests/gem_tiled_blits
[480/656] Linking target tests/gem_tiled_fence_blits
[481/656] Linking target tests/gem_tiled_pread_basic
[482/656] Linking target tests/gem_tiled_pread_pwrite
[483/656] Linking target tests/gem_tiled_swapping
[484/656] Linking target tests/gem_tiled_wb
[485/656] Linking target tests/gem_tiled_wc
[486/656] Linking target tests/gem_tiling_max_stride
[487/656] Linking target tests/gem_unfence_active_buffers
[488/656] Linking target tests/gem_userptr_blits
[489/656] Linking target tests/gem_unref_active_buffers
[490/656] Linking target tests/gem_watchdog
[491/656] Linking target tests/gem_vm_create
[492/656] Linking target tests/gem_wait
[493/656] Linking target tests/gem_workarounds
[494/656] Linking target tests/i915_fb_tiling
[495/656] Linking target tests/i915_getparams_basic
[496/656] Linking target tests/i915_hangman
[497/656] Linking target tests/i915_module_load
[498/656] Linking target tests/i915_pciid
[499/656] Linking target tests/i915_pm_backlight
[500/656] Linking target tests/i915_pm_rpm
[501/656] Linking target tests/i915_pm_lpsp
[502/656] Linking target tests/i915_pm_dc
[503/656] Linking target tests/i915_pm_rps
[504/656] Linking target tests/i915_pm_sseu
[505/656] Linking target tests/i915_query
[506/656] Linking target tests/i915_selftest
[507/656] Linking target tests/kms_big_joiner
[508/656] Linking target tests/i915_suspend
[509/656] Compiling C object tests/kms_draw_crc.p/i915_kms_draw_crc.c.o
FAILED: tests/kms_draw_crc.p/i915_kms_draw_crc.c.o
ccache cc -Itests/kms_draw_crc.p -Itests -I../tests -I../include/drm-uapi -I../include/linux-uapi -Ilib -I../lib -I../lib/stubs/syscalls -I. -I.. -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libpng12 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/x86_64-linux-gnu -I/usr/include/alsa -I/usr/include -I/home/cidrm/kernel_headers/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fcommon -pthread -MD -MQ tests/kms_draw_crc.p/i915_kms_draw_crc.c.o -MF tests/kms_draw_crc.p/i915_kms_draw_crc.c.o.d -o tests/kms_draw_crc.p/i915_kms_draw_crc.c.o -c ../tests/i915/kms_draw_crc.c ../tests/i915/kms_draw_crc.c: In function ‘setup_environment’:
../tests/i915/kms_draw_crc.c:268:20: error: ‘display’ undeclared (first use in this function)

  igt_display_reset(display);
                    ^~~~~~~

../tests/i915/kms_draw_crc.c:268:20: note: each undeclared identifier is reported only once for each function it appears in
ninja: build stopped: subcommand failed.