Skip to contentSkip to conversation

igt/tests: Fix error checking in kms_atomic_transition

PATCH New Stanislav Lisovskiy via igt-dev 2 participants 3 messages Feb 15, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 igt/tests: Fix error checking in kms_atomic_transition

From: Stanislav Lisovskiy <[email protected]>

There is no guarantee that error return value will be always EINVAL, made a check more general as it can be ERANGE, ENOSPC, EINVAL and probably others, which all mean the same in context of this test case: i.e this sprite size is not valid.

v2: Added macro to make check look a bit nicer.
v3: Removed redundant debug line.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109225

---
 tests/kms_atomic_transition.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
tests/kms_atomic_transition.c +7 -2
index 12bafe87..f5b32a99 100644
@@ -187,6 +187,11 @@ static void set_sprite_wh(igt_display_t *display, enum pipe pipe,
 		      LOCAL_DRM_FORMAT_MOD_NONE, sprite_fb);
 }
 
+#define is_atomic_check_failure_errno(errno) \
+		(errno == -EINVAL || \
+		errno == -ERANGE || \
+		errno == -ENOSPC)
+
 static void setup_parms(igt_display_t *display, enum pipe pipe,
 			const drmModeModeInfo *mode,
 			struct igt_fb *primary_fb,
@@ -252,7 +257,7 @@ retry:
 		wm_setup_plane(display, pipe, (1 << n_planes) - 1, parms, false);
 		ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 
-		if (ret == -EINVAL) {
+		if (is_atomic_check_failure_errno(ret)) {
 			if (cursor_width == sprite_width &&
 			    cursor_height == sprite_height) {
 				igt_assert_f(alpha,
@@ -442,7 +447,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 			igt_pipe_request_out_fence(pipe_obj);
 
 		ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
-		if (ret != -EINVAL || pipe_obj->n_planes < 3)
+		if (!is_atomic_check_failure_errno(ret) || pipe_obj->n_planes < 3)
 			break;
 
 		ret = 0;
Signature · 6 lines
2.17.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for igt/tests: Fix error checking in kms_atomic_transition (rev3)

== Series Details ==

== Series Details ==

Series: igt/tests: Fix error checking in kms_atomic_transition (rev3)
URL : https://patchwork.freedesktop.org/series/56617/
State : success

== Summary ==

CI Bug Log - changes from IGT_4831 -> IGTPW_2423
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/56617/revisions/3/mbox/

Known issues
------------

Here are the changes found in IGTPW_2423 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@pm_rpm@basic-rte:
- fi-bsw-kefka: PASS -> FAIL [fdo#108800]

#### Possible fixes ####

* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: FAIL [fdo#103167] -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271

Participating hosts (51 -> 42)
------------------------------

Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u3 fi-icl-y fi-bdw-samus

Build changes
-------------

* IGT: IGT_4831 -> IGTPW_2423

CI_DRM_5608: a6301f3b868a688c97ae63d9ad4cb69ff62596bb @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2423: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2423/
IGT_4831: 616842ef493ead76ac6c75b2a93337439724655f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2423/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for igt/tests: Fix error checking in kms_atomic_transition (rev3)

In reply to Stanislav Lisovskiy via igt-dev
== Series Details ==

== Series Details ==

Series: igt/tests: Fix error checking in kms_atomic_transition (rev3)
URL : https://patchwork.freedesktop.org/series/56617/
State : success

== Summary ==

CI Bug Log - changes from IGT_4831_full -> IGTPW_2423_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/56617/revisions/3/mbox/

Known issues
------------

Here are the changes found in IGTPW_2423_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_flush@basic-uc-pro-default:
- shard-snb: PASS -> INCOMPLETE [fdo#105411]

* igt@i915_suspend@shrink:
- shard-glk: NOTRUN -> DMESG-WARN [fdo#109244]

* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-glk: NOTRUN -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-snb: NOTRUN -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-pageflip-hang-newfb-render-b:
- shard-apl: PASS -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-pageflip-hang-newfb-render-c:
- shard-apl: NOTRUN -> DMESG-WARN [fdo#107956] +1

* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-apl: PASS -> FAIL [fdo#106510] / [fdo#108145]

* igt@kms_cursor_crc@cursor-128x128-onscreen:
- shard-kbl: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-128x42-sliding:
- shard-apl: PASS -> FAIL [fdo#103232] +2

* igt@kms_cursor_crc@cursor-64x21-random:
- shard-glk: NOTRUN -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-alpha-opaque:
- shard-glk: PASS -> FAIL [fdo#109350]

* igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
- shard-glk: NOTRUN -> FAIL [fdo#105454] / [fdo#106509]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- shard-apl: PASS -> FAIL [fdo#103167] +1

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
- shard-glk: PASS -> FAIL [fdo#103167] +3

* igt@kms_frontbuffer_tracking@fbc-stridechange:
- shard-hsw: NOTRUN -> FAIL [fdo#105682]

* igt@kms_plane@pixel-format-pipe-c-planes:
- shard-apl: PASS -> FAIL [fdo#103166] +2

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-apl: PASS -> FAIL [fdo#108145]

* igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166] +4

* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: NOTRUN -> FAIL [fdo#103166] +1

* igt@kms_setmode@basic:
- shard-hsw: NOTRUN -> FAIL [fdo#99912]
- shard-kbl: PASS -> FAIL [fdo#99912]

* igt@kms_universal_plane@universal-plane-pipe-c-functional:
- shard-kbl: NOTRUN -> FAIL [fdo#103166]

* igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
- shard-apl: PASS -> FAIL [fdo#104894]
- shard-kbl: PASS -> FAIL [fdo#104894]

#### Possible fixes ####

* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: INCOMPLETE [fdo#105411] / [fdo#109386] -> PASS

* igt@kms_atomic_transition@plane-toggle-modeset-transition:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS +1

* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-glk: FAIL [fdo#108145] -> PASS

* igt@kms_color@pipe-a-legacy-gamma:
- shard-glk: FAIL [fdo#104782] / [fdo#108145] -> PASS

* igt@kms_color@pipe-b-degamma:
- shard-apl: FAIL [fdo#104782] -> PASS

* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS +1
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS

* igt@kms_cursor_crc@cursor-256x85-random:
- shard-apl: FAIL [fdo#103232] -> PASS +6

* igt@kms_cursor_crc@cursor-64x64-sliding:
- shard-kbl: FAIL [fdo#103232] -> PASS

* igt@kms_cursor_crc@cursor-alpha-opaque:
- shard-apl: FAIL [fdo#109350] -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
- shard-apl: FAIL [fdo#103167] -> PASS
- shard-kbl: FAIL [fdo#103167] -> PASS

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
- shard-glk: FAIL [fdo#103167] -> PASS +6

* igt@kms_frontbuffer_tracking@fbc-2p-rte:
- shard-glk: FAIL [fdo#103167] / [fdo#105682] -> PASS

* igt@kms_plane@pixel-format-pipe-a-planes:
- shard-kbl: FAIL [fdo#103166] -> PASS

* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-glk: FAIL [fdo#108948] -> PASS

* igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-glk: FAIL [fdo#103166] -> PASS +2
- shard-apl: FAIL [fdo#103166] -> PASS +5

* igt@kms_vblank@pipe-b-query-forked-busy-hang:
- shard-snb: {SKIP} [fdo#109271] -> PASS +5

* igt@kms_vblank@pipe-c-ts-continuation-modeset-rpm:
- shard-kbl: FAIL [fdo#104894] -> PASS

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: FAIL [fdo#104894] -> PASS +5

* igt@tools_test@tools_test:
- shard-glk: {SKIP} [fdo#109271] -> PASS

#### Warnings ####

* igt@i915_suspend@shrink:
- shard-apl: INCOMPLETE [fdo#103927] / [fdo#106886] -> DMESG-WARN [fdo#107886] / [fdo#109244]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105454]: https://bugs.freedesktop.org/show_bug.cgi?id=105454
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
[fdo#106510]: https://bugs.freedesktop.org/show_bug.cgi?id=106510
[fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886
[fdo#107886]: https://bugs.freedesktop.org/show_bug.cgi?id=107886
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
[fdo#109386]: https://bugs.freedesktop.org/show_bug.cgi?id=109386
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

Build changes
-------------

* IGT: IGT_4831 -> IGTPW_2423

CI_DRM_5608: a6301f3b868a688c97ae63d9ad4cb69ff62596bb @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2423: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2423/
IGT_4831: 616842ef493ead76ac6c75b2a93337439724655f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2423/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev