tests/kms_vblank: Convert test to dynamic
PATCH 1/1 tests/kms_vblank: Convert test to dynamic
Convert existing subtests to dynamic subtests at pipe/output level.
--- tests/kms_vblank.c | 61 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 30 deletions(-)
tests/kms_vblank.c +31 -30
@@ -21,11 +21,6 @@* IN THE SOFTWARE. */ -/** @file kms_vblank.c -* -* This is a test of performance of drmWaitVblank. -*/ -#include "igt.h" #include <stdlib.h> #include <stdio.h>
@@ -41,7 +36,7 @@#include <drm.h> -IGT_TEST_DESCRIPTION ("Test speed of WaitVblank." ); +IGT_TEST_DESCRIPTION ("This is a test of performance of drmWaitVblank." ); typedef struct { igt_display_t display;
@@ -125,7 +120,7 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int))if (data->flags &RPM )igt_require (igt_setup_runtime_pm (fd)); -igt_info ("Beginning %s on pipe %s, connector %s\n" , +igt_debug ("Beginning %s on pipe %s, connector %s\n" ,igt_subtest_name (),kmstest_pipe_name (data->pipe),igt_output_name (output));
@@ -166,7 +161,7 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int))if (!(data->flags &NOHANG ))igt_post_hang_ring (fd, hang); -igt_info ("\n%s on pipe %s, connector %s: PASSED\n\n" , +igt_debug ("\n%s on pipe %s, connector %s: PASSED\n\n" ,igt_subtest_name (),kmstest_pipe_name (data->pipe),igt_output_name (output));put_ahnd (ahnd);
@@ -403,8 +398,10 @@ static void vblank_ts_cont(data_t *data, int fd, int nchildren) estimated_vblanks, seq2, seq1 + estimated_vblanks); } -static void run_subtests_for_pipe (data_t *data) +static void run_subtests (data_t *data) { +enum pipe p; + const struct { const char *name; void (*func)(data_t *, int, int);
@@ -438,20 +435,21 @@ static void run_subtests_for_pipe(data_t *data) }, *m; igt_fixture - igt_display_require_output_on_pipe(&data->display, data->pipe); + igt_display_require_output_on_pipe(&data->display, p);for (f = funcs; f->name; f++) {for (m = modes; m->name; m++) {if (m->flags & ~(f->valid |NOHANG ))continue ; -igt_describe ("Check if test run while hanging by introducing NOHANG flag" ); -igt_subtest_f ("pipe-%s-%s-%s" , -kmstest_pipe_name (data->pipe), - f->name, m->name) { -for_each_valid_output_on_pipe (&data->display, data->pipe, data->output) { - data->flags = m->flags |NOHANG ; -run_test (data, f->func); +igt_describe ("Check if test run while hanging by introducing NOHANG flag." ); + igt_subtest_with_dynamic_f("%s-%s", f->name, m->name) { +for_each_pipe_with_valid_output (&data->display, p, data->output) { + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(p), data->output->name) { + data->pipe = p; + data->flags = m->flags |NOHANG ; +run_test (data, f->func); + } } }
@@ -459,16 +457,16 @@ static void run_subtests_for_pipe(data_t *data)if (f->valid &NOHANG || m->flags &NOHANG )continue ; -igt_describe ("check if injected hang is working properly" ); -igt_subtest_f ("pipe-%s-%s-%s-hang" , -kmstest_pipe_name (data->pipe), - f->name, m->name) { +igt_describe ("Check if injected hang is working properly." ); + igt_subtest_with_dynamic_f("%s-%s-hang", f->name, m->name) {igt_hang_t hang; - hang =igt_allow_hang (data->display.drm_fd,0 ,0 ); -for_each_valid_output_on_pipe (&data->display, data->pipe, data->output) { - data->flags = m->flags; -run_test (data, f->func); +for_each_pipe_with_valid_output (&data->display, p, data->output) { + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(p), data->output->name) { + data->pipe = p; + data->flags = m->flags; +run_test (data, f->func); + } }igt_disallow_hang (data->display.drm_fd, hang); }
@@ -539,15 +537,18 @@ igt_mainigt_display_require_output (&data.display); } -igt_describe ("Negative test for vblank request" ); +igt_describe ("Negative test for vblank request." ); igt_subtest("invalid")invalid_subtest (&data, fd); -igt_describe ("check the Vblank and flip events works with given crtc id" ); +igt_describe ("Test to check vblank and flip events work with given crtc id." ); igt_subtest("crtc-id")crtc_id_subtest (&data, fd); -for_each_pipe_static (data.pipe) - igt_subtest_group -run_subtests_for_pipe (&data); +run_subtests (&data); + + igt_fixture { +igt_display_fini (&data.display); +close (fd); + } }
Signature · 1 line
2.25.1
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_vblank: Convert test to dynamic
== Series Details ==
== Series Details ==
Series: tests/kms_vblank: Convert test to dynamic
URL : https://patchwork.freedesktop.org/series/109170/
State : failure
== Summary ==
CI Bug Log - changes from IGT_6667 -> IGTPW_7860
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_7860 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_7860, 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_7860/index.html
Participating hosts (45 -> 44)
------------------------------
Missing (1): fi-bdw-samus
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_7860:
### IGT changes ###
#### Possible regressions ####
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-a-hdmi-a-1:
- fi-skl-6700k2: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6667/fi-skl-6700k2/igt@kms_pipe_crc_basic@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7860/fi-skl-6700k2/igt@kms_pipe_crc_basic@[email protected]
Known issues
------------
Here are the changes found in IGTPW_7860 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s3@smem:
- fi-rkl-11600: NOTRUN -> [FAIL][3] ([fdo#103375])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7860/fi-rkl-11600/igt@gem_exec_suspend@[email protected]
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-rkl-11600: NOTRUN -> [SKIP][4] ([fdo#111827])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7860/fi-rkl-11600/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3@lmem0:
- {bat-dg2-11}: [DMESG-WARN][5] ([i915#6816]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6667/bat-dg2-11/igt@gem_exec_suspend@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7860/bat-dg2-11/igt@gem_exec_suspend@[email protected]
* igt@gem_exec_suspend@basic-s3@smem:
- {bat-adlm-1}: [DMESG-WARN][7] ([i915#2867]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6667/bat-adlm-1/igt@gem_exec_suspend@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7860/bat-adlm-1/igt@gem_exec_suspend@[email protected]
* igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600: [INCOMPLETE][9] ([i915#5982]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6667/fi-rkl-11600/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7860/fi-rkl-11600/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982
[i915#6816]: https://gitlab.freedesktop.org/drm/intel/issues/6816
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_6667 -> IGTPW_7860
CI-20190529: 20190529
CI_DRM_12193: 0f0716dcfd8446cde4391475c9c3656ca670b55f @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_7860: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7860/index.html
IGT_6667: 97ec0c0a3c6b9d02a4f63cf4ac699cee3dc6ac53 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+++ 25 lines
--- 150 lines
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7860/index.html
Quoted 33 lines · Swati Sharma
Convert existing subtests to dynamic subtests at pipe/output level.
Signed-off-by Swati Sharma <[email protected]>--- tests/kms_vblank.c | 61 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 30 deletions(-)tests/kms_vblank.c +1
-6@@ -21,11 +21,6 @@* IN THE SOFTWARE. */ -/** @file kms_vblank.c -* -* This is a test of performance of drmWaitVblank. -*/ -#include "igt.h" #include <stdlib.h> #include <stdio.h> @@ -41,7 +36,7 @@#include <drm.h> -IGT_TEST_DESCRIPTION ("Test speed of WaitVblank." ); +IGT_TEST_DESCRIPTION ("This is a test of performance of drmWaitVblank." ); typedef struct { igt_display_t display;
tests/kms_vblank.c static void run_test(data_t *data, void (*testfunc)(data_t *, int, int)) · line 125
Quoted 7 lines
tests/kms_vblank.c +1
-1@@ -125,7 +120,7 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int))if (data->flags &RPM )igt_require (igt_setup_runtime_pm (fd)); -igt_info ("Beginning %s on pipe %s, connector %s\n" , +igt_debug ("Beginning %s on pipe %s, connector %s\n" ,igt_subtest_name (),kmstest_pipe_name (data->pipe),igt_output_name (output));
We can drop this print, since this info is available in dynamic subtest name.
tests/kms_vblank.c static void run_test(data_t *data, void (*testfunc)(data_t *, int, int)) · line 165
Quoted 8 lines
tests/kms_vblank.c +1
-1@@ -166,7 +161,7 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int))if (!(data->flags &NOHANG ))igt_post_hang_ring (fd, hang); -igt_info ("\n%s on pipe %s, connector %s: PASSED\n\n" , +igt_debug ("\n%s on pipe %s, connector %s: PASSED\n\n" ,igt_subtest_name (),kmstest_pipe_name (data->pipe),igt_output_name (output));
Here also.
Quoted 15 lines
tests/kms_vblank.c +3
-1put_ahnd (ahnd);@@ -403,8 +398,10 @@ static void vblank_ts_cont(data_t *data, int fd, int nchildren) estimated_vblanks, seq2, seq1 + estimated_vblanks); } -static void run_subtests_for_pipe (data_t *data) +static void run_subtests (data_t *data) { +enum pipe p; + const struct { const char *name; void (*func)(data_t *, int, int);
tests/kms_vblank.c static void run_subtests_for_pipe(data_t *data) · line 438
Quoted 5 lines
tests/kms_vblank.c +1
-1@@ -438,20 +435,21 @@ static void run_subtests_for_pipe(data_t *data) }, *m; igt_fixture - igt_display_require_output_on_pipe(&data->display, data->pipe); + igt_display_require_output_on_pipe(&data->display, p);
Please drop this, as we are using for_each_pipe_with_valid_output(), this check is redundant.
Quoted 50 lines
tests/kms_vblank.c +16
-15for (f = funcs; f->name; f++) {for (m = modes; m->name; m++) {if (m->flags & ~(f->valid |NOHANG ))continue ; -igt_describe ("Check if test run while hanging by introducing NOHANG flag" ); -igt_subtest_f ("pipe-%s-%s-%s" , -kmstest_pipe_name (data->pipe), - f->name, m->name) { -for_each_valid_output_on_pipe (&data->display, data->pipe, data->output) { - data->flags = m->flags |NOHANG ; -run_test (data, f->func); +igt_describe ("Check if test run while hanging by introducing NOHANG flag." ); + igt_subtest_with_dynamic_f("%s-%s", f->name, m->name) { +for_each_pipe_with_valid_output (&data->display, p, data->output) { + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(p), data->output->name) { + data->pipe = p; + data->flags = m->flags |NOHANG ; +run_test (data, f->func); + } } }@@ -459,16 +457,16 @@ static void run_subtests_for_pipe(data_t *data)if (f->valid &NOHANG || m->flags &NOHANG )continue ; -igt_describe ("check if injected hang is working properly" ); -igt_subtest_f ("pipe-%s-%s-%s-hang" , -kmstest_pipe_name (data->pipe), - f->name, m->name) { +igt_describe ("Check if injected hang is working properly." ); + igt_subtest_with_dynamic_f("%s-%s-hang", f->name, m->name) {igt_hang_t hang; - hang =igt_allow_hang (data->display.drm_fd,0 ,0 ); -for_each_valid_output_on_pipe (&data->display, data->pipe, data->output) { - data->flags = m->flags; -run_test (data, f->func); +for_each_pipe_with_valid_output (&data->display, p, data->output) { + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(p), data->output->name) { + data->pipe = p; + data->flags = m->flags; +run_test (data, f->func); + } }igt_disallow_hang (data->display.drm_fd, hang); }
tests/kms_vblank.c igt_main · line 542
Quoted 7 lines
tests/kms_vblank.c +1
-1@@ -539,15 +537,18 @@ igt_mainigt_display_require_output (&data.display); } -igt_describe ("Negative test for vblank request" ); +igt_describe ("Negative test for vblank request." ); igt_subtest("invalid")invalid_subtest (&data, fd);
It seems, we are running this test on Pipe-A only. What if Pipe-A is not available?
tests/kms_vblank.c igt_main · line 546
Quoted 5 lines
tests/kms_vblank.c +1
-1-igt_describe ("check the Vblank and flip events works with given crtc id" ); +igt_describe ("Test to check vblank and flip events work with given crtc id." ); igt_subtest("crtc-id")crtc_id_subtest (&data, fd);
Looks, this test is running for_each_pipe_with_valid_output(), so we need to convert to dynamic.
- Bhanu
Quoted 11 lines
tests/kms_vblank.c +6
-3-for_each_pipe_static (data.pipe) - igt_subtest_group -run_subtests_for_pipe (&data); +run_subtests (&data); + + igt_fixture { +igt_display_fini (&data.display); +close (fd); + } }