tests/kms_rmfb: IGT test cleanup
v2 cover tests/kms_rmfb: IGT test cleanup
Convert all possible subtests to dynamic and sanitize the system state before starting/exiting the subtest.
Mohammed Thasleem (2):
tests/kms_rmfb: Create dynamic subtests
tests/kms_rmfb: Test Cleanup
tests/kms_rmfb.c | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-)
Signature · 1 line
2.25.1
PATCH v2 1/2 tests/kms_rmfb: Create dynamic subtests
Modified kms_rmfb to include dynamic test cases.
v2: addressed indentation, test description moved into struct
and added global description to test.
v3: minor changes.
--- tests/kms_rmfb.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-)
tests/kms_rmfb.c +27 -10
@@ -36,6 +36,9 @@#define DRM_CAP_CURSOR_HEIGHT 0x9#endif +IGT_TEST_DESCRIPTION ("This tests rmfb and close-fd behavior. In these cases" +"the framebuffers should be removed from the crtc." ); +struct rmfb_data {int drm_fd;igt_display_t display;
@@ -151,13 +154,28 @@ run_rmfb_test(struct rmfb_data *data, bool reopen)igt_output_t *output;enum pipe pipe; -for_each_pipe_with_single_output (&data->display, pipe, output) -test_rmfb (data, output, pipe, reopen); +for_each_pipe_with_single_output (&data->display, pipe, output) { +igt_dynamic_f ("%s-pipe-%s" ,igt_output_name (output), + kmstest_pipe_name(pipe)) +test_rmfb (data, output, pipe, reopen); + } } igt_main { +const struct { +bool flags; +const char *name; +const char *description; + } tests[] = { + { false,"rmfb-ioctl" ,"RMFB is supposed to free the framebuffers from any and all " +"planes so test this and make sure it works." }, + { true,"close-fd" ,"RMFB is supposed to free the framebuffers from any and all " +"planes so test this and make sure it works with fd close " +"and reopen." }, + };struct rmfb_data data = {}; +int i; igt_fixture { data.drm_fd =drm_open_driver_master (DRIVER_ANY );
@@ -168,15 +186,14 @@ igt_mainigt_display_require_output (&data.display); } -igt_describe ("RMFB is supposed to free the framebuffers from any and all " -"planes so test this and make sure it works." ); - igt_subtest_f("rmfb-ioctl") -run_rmfb_test (&data, false); +for (i =0 ; i <ARRAY_SIZE (tests); i++) { + +igt_describe (tests[i].description); + igt_subtest_with_dynamic(tests[i].name) { +run_rmfb_test (&data, tests[i].flags); -igt_describe ("RMFB is supposed to free the framebuffers from any and all planes " -"so test this and make sure it works with fd close and reopen." ); - igt_subtest_f("close-fd") -run_rmfb_test (&data, true); + } + } igt_fixture {igt_display_fini (&data.display);
Signature · 1 line
2.25.1
Re: [igt-dev] [PATCH v2 1/2] tests/kms_rmfb: Create dynamic subtests
Hi Mohammed,
Quoted 57 lines · Mohammed Thasleem
Modified
kms_rmfbto include dynamic test cases.v2: addressed indentation, test description moved into struct
and added global description to test.
v3: minor changes.Signed-off-by Mohammed Thasleem <[email protected]>--- tests/kms_rmfb.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-)tests/kms_rmfb.c +20
-2@@ -36,6 +36,9 @@#define DRM_CAP_CURSOR_HEIGHT 0x9#endif +IGT_TEST_DESCRIPTION ("This tests rmfb and close-fd behavior. In these cases" +"the framebuffers should be removed from the crtc." ); +struct rmfb_data {int drm_fd;igt_display_t display;@@ -151,13 +154,28 @@ run_rmfb_test(struct rmfb_data *data, bool reopen)igt_output_t *output;enum pipe pipe; -for_each_pipe_with_single_output (&data->display, pipe, output) -test_rmfb (data, output, pipe, reopen); +for_each_pipe_with_single_output (&data->display, pipe, output) { +igt_dynamic_f ("%s-pipe-%s" ,igt_output_name (output), + kmstest_pipe_name(pipe)) +test_rmfb (data, output, pipe, reopen); + } } igt_main { +const struct { +bool flags; +const char *name; +const char *description; + } tests[] = { + { false,"rmfb-ioctl" ,"RMFB is supposed to free the framebuffers from any and all " +"planes so test this and make sure it works." }, + { true,"close-fd" ,"RMFB is supposed to free the framebuffers from any and all " +"planes so test this and make sure it works with fd close " +"and reopen." }, + };struct rmfb_data data = {}; +int i; igt_fixture { data.drm_fd =drm_open_driver_master (DRIVER_ANY );
tests/kms_rmfb.c igt_main · line 190
Quoted 9 lines
tests/kms_rmfb.c +2
-4@@ -168,15 +186,14 @@ igt_mainigt_display_require_output (&data.display); } -igt_describe ("RMFB is supposed to free the framebuffers from any and all " -"planes so test this and make sure it works." ); - igt_subtest_f("rmfb-ioctl") -run_rmfb_test (&data, false); +for (i =0 ; i <ARRAY_SIZE (tests); i++) { +
Remove this empy line. With that fixed you can add my r-b tag. Please use Kamil Konieczny <[email protected]> in r-b tag, also when sending please put mailing list in To and all other addresses in Cc field.
Regards,
Kamil
Quoted 16 lines
tests/kms_rmfb.c +5
-4+igt_describe (tests[i].description); + igt_subtest_with_dynamic(tests[i].name) { +run_rmfb_test (&data, tests[i].flags); -igt_describe ("RMFB is supposed to free the framebuffers from any and all planes " -"so test this and make sure it works with fd close and reopen." ); - igt_subtest_f("close-fd") -run_rmfb_test (&data, true); + } + } igt_fixture {igt_display_fini (&data.display);Signature · 1 line
2.25.1
Re: [igt-dev] [PATCH v2 1/2] tests/kms_rmfb: Create dynamic subtests
Hi Kamil,
Thanks for reviews.
Addressed comments at v4.
-----Original Message-----
From: Kamil Konieczny <[email protected]>
Sent: Tuesday, June 28, 2022 12:16 PM
To: [email protected]
Cc: Thasleem, Mohammed <[email protected]>
Subject: Re: [igt-dev] [PATCH v2 1/2] tests/kms_rmfb: Create dynamic subtests
Hi Mohammed,
Quoted 57 lines · Mohammed Thasleem
Modified
kms_rmfbto include dynamic test cases.v2: addressed indentation, test description moved into struct
and added global description to test.
v3: minor changes.Signed-off-by Mohammed Thasleem <[email protected]>--- tests/kms_rmfb.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-)tests/kms_rmfb.c index renamed from tests/kms_rmfb.c +0
-0
fcd5cdad..89f7c80c100644tests/kms_rmfb.c +20
-2@@ -36,6 +36,9 @@#define DRM_CAP_CURSOR_HEIGHT 0x9#endif +IGT_TEST_DESCRIPTION ("This tests rmfb and close-fd behavior. In these cases" +"the framebuffers should be removed from the crtc." ); +struct rmfb_data {int drm_fd;igt_display_t display;@@ -151,13 +154,28 @@ run_rmfb_test(struct rmfb_data *data, bool reopen)igt_output_t *output;enum pipe pipe; -for_each_pipe_with_single_output (&data->display, pipe, output) -test_rmfb (data, output, pipe, reopen); +for_each_pipe_with_single_output (&data->display, pipe, output) { +igt_dynamic_f ("%s-pipe-%s" ,igt_output_name (output), + kmstest_pipe_name(pipe)) +test_rmfb (data, output, pipe, reopen); + } } igt_main { +const struct { +bool flags; +const char *name; +const char *description; + } tests[] = { + { false,"rmfb-ioctl" ,"RMFB is supposed to free the framebuffers from any and all " +"planes so test this and make sure it works." }, + { true,"close-fd" ,"RMFB is supposed to free the framebuffers from any and all " +"planes so test this and make sure it works with fd close " +"and reopen." }, + };struct rmfb_data data = {}; +int i; igt_fixture { data.drm_fd =drm_open_driver_master (DRIVER_ANY );
tests/kms_rmfb.c igt_main · line 190
Quoted 9 lines
tests/kms_rmfb.c +2
-4@@ -168,15 +186,14 @@ igt_mainigt_display_require_output (&data.display); } -igt_describe ("RMFB is supposed to free the framebuffers from any and all " -"planes so test this and make sure it works." ); - igt_subtest_f("rmfb-ioctl") -run_rmfb_test (&data, false); +for (i =0 ; i <ARRAY_SIZE (tests); i++) { +
Remove this empy line. With that fixed you can add my r-b tag.
Please use Kamil Konieczny <[email protected]> in r-b tag, also when sending please put mailing list in To and all other addresses in Cc field.
Regards,
Kamil
Quoted 16 lines
tests/kms_rmfb.c +5
-5+igt_describe (tests[i].description); + igt_subtest_with_dynamic(tests[i].name) { +run_rmfb_test (&data, tests[i].flags); -igt_describe ("RMFB is supposed to free the framebuffers from any and all planes " -"so test this and make sure it works with fd close and reopen." ); - igt_subtest_f("close-fd") -run_rmfb_test (&data, true); + } + } igt_fixture {igt_display_fini (&data.display); --2.25.1
PATCH v2 2/2 tests/kms_rmfb: Test Cleanup
In reply to Mohammed ThasleemSanitize the system state before starting the subtest.
--- tests/kms_rmfb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
tests/kms_rmfb.c +7 -1
@@ -57,12 +57,14 @@ static void test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reopen) { struct igt_fb fb, argb_fb; +igt_display_t *display = &data->display;drmModeModeInfo *mode;igt_plane_t *plane;drmModeCrtc *crtc;uint64_t cursor_width, cursor_height;int num_active_planes =0 ; +igt_display_reset (display);igt_output_set_pipe (output, pipe); mode =igt_output_get_mode (output);
@@ -145,7 +147,7 @@ test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reodrmModeFreePlane (planeres); } -igt_output_set_pipe (output,PIPE_ANY ); +igt_output_set_pipe (output,PIPE_NONE ); } static void
@@ -184,6 +186,9 @@ igt_mainigt_display_require (&data.display, data.drm_fd);igt_display_require_output (&data.display); +igt_display_reset (&data.display); +igt_display_commit2 (&data.display, data.display.is_atomic ? +COMMIT_ATOMIC :COMMIT_LEGACY ); }for (i =0 ; i <ARRAY_SIZE (tests); i++) {
@@ -197,5 +202,6 @@ igt_main igt_fixture {igt_display_fini (&data.display); +close (data.drm_fd); } }
Signature · 1 line
2.25.1
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_rmfb: IGT test cleanup (rev3)
In reply to Mohammed Thasleem== Series Details ==
== Series Details ==
Series: tests/kms_rmfb: IGT test cleanup (rev3)
URL : https://patchwork.freedesktop.org/series/105149/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_11815 -> IGTPW_7402
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_7402 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_7402, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/index.html
Participating hosts (40 -> 41)
------------------------------
Additional (3): bat-adln-1 fi-icl-u2 bat-dg2-9
Missing (2): fi-bxt-dsi fi-bdw-samus
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_7402:
### IGT changes ###
#### Possible regressions ####
* igt@gem_exec_parallel@engines@fds:
- fi-bsw-kefka: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11815/fi-bsw-kefka/igt@gem_exec_parallel@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-bsw-kefka/igt@gem_exec_parallel@[email protected]
Known issues
------------
Here are the changes found in IGTPW_7402 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_huc_copy@huc-copy:
- fi-icl-u2: NOTRUN -> [SKIP][3] ([i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
* igt@gem_lmem_swapping@random-engines:
- fi-icl-u2: NOTRUN -> [SKIP][4] ([i915#4613]) +3 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
* igt@i915_suspend@basic-s3-without-i915:
- fi-icl-u2: NOTRUN -> [SKIP][5] ([i915#5903])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
* igt@kms_busy@basic@modeset:
- bat-adlp-4: [PASS][6] -> [DMESG-WARN][7] ([i915#3576]) +1 similar issue
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11815/bat-adlp-4/igt@kms_busy@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/bat-adlp-4/igt@kms_busy@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: NOTRUN -> [SKIP][8] ([fdo#111827]) +8 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-icl-u2: NOTRUN -> [SKIP][9] ([i915#4103])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
* igt@kms_flip@basic-flip-vs-dpms@a-edp1:
- fi-tgl-u2: [PASS][10] -> [DMESG-WARN][11] ([i915#402])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11815/fi-tgl-u2/igt@kms_flip@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-tgl-u2/igt@kms_flip@[email protected]
* igt@kms_force_connector_basic@force-connector-state:
- fi-icl-u2: NOTRUN -> [WARN][12] ([i915#6008])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- fi-icl-u2: NOTRUN -> [SKIP][13] ([fdo#109285])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
* igt@kms_setmode@basic-clone-single-crtc:
- fi-icl-u2: NOTRUN -> [SKIP][14] ([i915#3555])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
* igt@prime_vgem@basic-userptr:
- fi-icl-u2: NOTRUN -> [SKIP][15] ([fdo#109295] / [i915#3301])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-icl-u2/igt@[email protected]
- fi-tgl-u2: NOTRUN -> [SKIP][16] ([fdo#109295] / [i915#3301])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-tgl-u2/igt@[email protected]
* igt@runner@aborted:
- fi-bsw-kefka: NOTRUN -> [FAIL][17] ([i915#4312])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/fi-bsw-kefka/igt@[email protected]
#### Possible fixes ####
* igt@kms_flip@basic-flip-vs-modeset@b-edp1:
- {bat-adlp-6}: [DMESG-WARN][18] ([i915#3576]) -> [PASS][19] +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11815/bat-adlp-6/igt@kms_flip@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/bat-adlp-6/igt@kms_flip@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3576]: https://gitlab.freedesktop.org/drm/intel/issues/3576
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#5174]: https://gitlab.freedesktop.org/drm/intel/issues/5174
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5763]: https://gitlab.freedesktop.org/drm/intel/issues/5763
[i915#5903]: https://gitlab.freedesktop.org/drm/intel/issues/5903
[i915#6008]: https://gitlab.freedesktop.org/drm/intel/issues/6008
[i915#6299]: https://gitlab.freedesktop.org/drm/intel/issues/6299
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_6543 -> IGTPW_7402
CI-20190529: 20190529
CI_DRM_11815: 500f24fcd69dcbfbbf2e602dbb7313efb955e96a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_7402: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/index.html
IGT_6543: 0463b607ed58ceede542f9bad6a9dad8d77d6f9c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7402/index.html