Skip to contentSkip to conversation

tests/kms_vrr: fix compilation with Clang

PATCH In review Simon Ser 3 participants 4 messages Mar 21, 2019 – Apr 16, 2019

lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 tests/kms_vrr: fix compilation with Clang

Clang fails to compile this file with this error:

    ../tests/kms_vrr.c:203:20: error: suggest braces around
initialization of subobject [-Werror,-Wmissing-braces]
            drmVBlank vbl = { 0 };
                              ^
                              {}

As discussed in [1], using an empty initializer list is the preferred way to fix this.

[1]: https://lists.freedesktop.org/archives/igt-dev/2019-March/010841.html

---
 tests/kms_vrr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_vrr.c +1 -1
index e4703f5f..9801b40a 100644
@@ -200,7 +200,7 @@ static void prepare_test(data_t *data, igt_output_t *output, enum pipe pipe)
 static uint64_t
 wait_for_vblank(data_t *data, enum pipe pipe)
 {
-	drmVBlank vbl = { 0 };
+	drmVBlank vbl = {};
 
 	vbl.request.type = kmstest_get_vbl_flag(pipe);
 	vbl.request.type |= DRM_VBLANK_RELATIVE | DRM_VBLANK_EVENT;
Signature · 17 lines
2.21.0

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

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

[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_vrr: fix compilation with Clang

== Series Details ==

== Series Details ==

Series: tests/kms_vrr: fix compilation with Clang
URL : https://patchwork.freedesktop.org/series/58322/
State : success

== Summary ==

CI Bug Log - changes from IGT_4895 -> IGTPW_2677
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58322/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@cs-sdma:
- fi-skl-6770hq: NOTRUN -> SKIP [fdo#109271] +37
- fi-cfl-8109u: NOTRUN -> SKIP [fdo#109271] +37

* igt@amdgpu/amd_basic@query-info:
- fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] +55

* igt@gem_ctx_param@basic:
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] +106

* igt@gem_exec_basic@gtt-bsd:
- fi-bwr-2160: NOTRUN -> SKIP [fdo#109271] +103

* igt@gem_exec_basic@gtt-bsd1:
- fi-bxt-j4205: NOTRUN -> SKIP [fdo#109271] +47

* igt@gem_exec_basic@gtt-bsd2:
- fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57

* igt@gem_exec_gttfill@basic:
- fi-skl-gvtdvm: NOTRUN -> SKIP [fdo#109271] +41

* igt@gem_mmap_gtt@basic-write-cpu-read-gtt:
- fi-apl-guc: NOTRUN -> SKIP [fdo#109271] +50

* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: NOTRUN -> FAIL [fdo#108511]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: NOTRUN -> INCOMPLETE [fdo#103927] / [fdo#109720]

* igt@i915_selftest@live_hangcheck:
- fi-ilk-650: PASS -> INCOMPLETE [fdo#109723]

* igt@kms_busy@basic-flip-c:

    - fi-gdg-551:         NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-bwr-2160:        NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-bsw-kefka:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-byt-n2820:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-byt-clapper:     NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_chamelium@dp-edid-read:
- fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] +56

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

* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: NOTRUN -> FAIL [fdo#103182]

* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
[fdo#109723]: https://bugs.freedesktop.org/show_bug.cgi?id=109723

Participating hosts (35 -> 37)
------------------------------

Additional (10): fi-skl-gvtdvm fi-skl-6770hq fi-bwr-2160 fi-apl-guc fi-bxt-j4205 fi-gdg-551 fi-cfl-8109u fi-bsw-kefka fi-byt-n2820 fi-byt-clapper
Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-pnv-d510 fi-bdw-samus

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

* IGT: IGT_4895 -> IGTPW_2677

CI_DRM_5785: 1e3d80c25878b7d97ad6c0680a452d55baeb28e0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2677: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2677/
IGT_4895: a782b09d2847b1ca9484694c1f752cfb972e8400 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tests/kms_vrr: fix compilation with Clang

In reply to Simon Ser
== Series Details ==

== Series Details ==

Series: tests/kms_vrr: fix compilation with Clang
URL : https://patchwork.freedesktop.org/series/58322/
State : success

== Summary ==

CI Bug Log - changes from IGT_4895_full -> IGTPW_2677_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58322/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@preempt-other-chain-blt:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +150

* igt@gem_stolen@stolen-clear:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +12

* igt@kms_available_modes_crc@available_mode_test_crc:
- shard-glk: NOTRUN -> FAIL [fdo#106641]

* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-hsw: PASS -> DMESG-WARN [fdo#107956] +1

* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
- shard-snb: NOTRUN -> DMESG-WARN [fdo#107956]

* igt@kms_frontbuffer_tracking@fbcpsr-stridechange:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +4
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +1

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-e:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +16
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-glk: NOTRUN -> FAIL [fdo#108145]

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: PASS -> FAIL [fdo#109016]

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

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

* igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm:
- shard-apl: PASS -> FAIL [fdo#104894] +3

#### Possible fixes ####

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

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-kbl: DMESG-WARN [fdo#107956] -> PASS +1
- shard-hsw: DMESG-WARN [fdo#107956] -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:

    - shard-glk:          FAIL [fdo#103167] -> PASS
    - shard-apl:          FAIL [fdo#103167] -> PASS
    - shard-kbl:          FAIL [fdo#103167] -> PASS

* igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS

* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: FAIL [fdo#109016] -> PASS

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: DMESG-FAIL [fdo#105763] -> PASS

#### Warnings ####

* igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format:
- shard-glk: FAIL [fdo#110098] -> SKIP [fdo#109271] / [fdo#109278]

{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#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#110098]: https://bugs.freedesktop.org/show_bug.cgi?id=110098
[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_4895 -> IGTPW_2677

CI_DRM_5785: 1e3d80c25878b7d97ad6c0680a452d55baeb28e0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2677: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2677/
IGT_4895: a782b09d2847b1ca9484694c1f752cfb972e8400 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

Reviewed-by on v1 1/1
#3 lore raw
In reply to Simon Ser
Quoted 8 lines · Simon Ser

Clang fails to compile this file with this error:

    ../tests/kms_vrr.c:203:20: error: suggest braces around
initialization of subobject [-Werror,-Wmissing-braces]
            drmVBlank vbl = { 0 };
                              ^
                              {}
Quoted 6 lines

As discussed in [1], using an empty initializer list is the preferred way to fix this.

[1]: https://lists.freedesktop.org/archives/igt-dev/2019-March/010841.html

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