* [igt-dev] [PATCH i-g-t] tests/kms_flip: Print timevals as float
@ 2018-07-06 14:50 Ville Syrjala
2018-07-06 14:56 ` Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ville Syrjala @ 2018-07-06 14:50 UTC (permalink / raw)
To: igt-dev
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Time intervals as produced by timersub() are normalized to have
the tv_usec in the range 0-999999. That leads to very confusing
looking debug output for negative interval. Eg. an interval
of -0.1 seconds would be represented as tv_sec=-1, tv_usec=900000.
Let's just convert the thing to a float seconds value and print
that so that we'll get less confusing debug output.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/kms_flip.c | 43 +++++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 20 deletions(-)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 3d6fe948d3bb..393d690ab535 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -125,23 +125,28 @@ struct event_state {
int seq_step;
};
+static float timeval_float(const struct timeval *tv)
+{
+ return tv->tv_sec + tv->tv_usec / 1000000.0f;
+}
+
static void dump_event_state(const struct event_state *es)
{
igt_debug("name = %s\n"
- "last_ts = %ld.%06ld\n"
- "last_received_ts = %ld.%06ld\n"
+ "last_ts = %.06f\n"
+ "last_received_ts = %.06f\n"
"last_seq = %u\n"
- "current_ts = %ld.%06ld\n"
- "current_received_ts = %ld.%06ld\n"
+ "current_ts = %.06f\n"
+ "current_received_ts = %.06f\n"
"current_seq = %u\n"
"count = %u\n"
"seq_step = %d\n",
es->name,
- es->last_ts.tv_sec, es->last_ts.tv_usec,
- es->last_received_ts.tv_sec, es->last_received_ts.tv_usec,
+ timeval_float(&es->last_ts),
+ timeval_float(&es->last_received_ts),
es->last_seq,
- es->current_ts.tv_sec, es->current_ts.tv_usec,
- es->current_received_ts.tv_sec, es->current_received_ts.tv_usec,
+ timeval_float(&es->current_ts),
+ timeval_float(&es->current_received_ts),
es->current_seq,
es->count,
es->seq_step);
@@ -472,9 +477,8 @@ static void check_state(const struct test_output *o, const struct event_state *e
timersub(&es->current_ts, &es->current_received_ts, &diff);
if (!analog_tv_connector(o)) {
igt_assert_f(diff.tv_sec < 0 || (diff.tv_sec == 0 && diff.tv_usec <= 2000),
- "%s ts delayed for too long: %ld.%06ld\n",
- es->name, diff.tv_sec, diff.tv_usec);
-
+ "%s ts delayed for too long: %.06f\n",
+ es->name, timeval_float(&diff));
}
if (es->count == 0)
@@ -483,9 +487,8 @@ static void check_state(const struct test_output *o, const struct event_state *e
timersub(&es->current_ts, &es->last_received_ts, &diff);
igt_assert_f(timercmp(&es->last_received_ts, &es->current_ts, <),
"%s ts before the %s was issued!\n"
- "timerdiff %ld.%06ld\n",
- es->name, es->name,
- diff.tv_sec, diff.tv_usec);
+ "timerdiff %.06f\n",
+ es->name, es->name, timeval_float(&diff));
/* check only valid if no modeset happens in between, that increments by
* (1 << 23) on each step. This bounding matches the one in
@@ -517,16 +520,16 @@ static void check_state(const struct test_output *o, const struct event_state *e
elapsed = 1e6*diff.tv_sec + diff.tv_usec;
expected = (es->current_seq - es->last_seq) * actual_frame_time(o);
- igt_debug("%s ts/seq: last %ld.%06ld/%u, current %ld.%06ld/%u: elapsed=%.1fus expected=%.1fus +- %.1fus, error %.1f%%\n",
- es->name, es->last_ts.tv_sec, es->last_ts.tv_usec, es->last_seq,
- es->current_ts.tv_sec, es->current_ts.tv_usec, es->current_seq,
+ igt_debug("%s ts/seq: last %.06f/%u, current %.06f/%u: elapsed=%.1fus expected=%.1fus +- %.1fus, error %.1f%%\n",
+ es->name, timeval_float(&es->last_ts), es->last_seq,
+ timeval_float(&es->current_ts), es->current_seq,
elapsed, expected, expected * 0.005,
fabs((elapsed - expected) / expected) * 100);
igt_assert_f(fabs((elapsed - expected) / expected) <= 0.005,
- "inconsistent %s ts/seq: last %ld.%06ld/%u, current %ld.%06ld/%u: elapsed=%.1fus expected=%.1fus\n",
- es->name, es->last_ts.tv_sec, es->last_ts.tv_usec, es->last_seq,
- es->current_ts.tv_sec, es->current_ts.tv_usec, es->current_seq,
+ "inconsistent %s ts/seq: last %.06f/%u, current %.06f/%u: elapsed=%.1fus expected=%.1fus\n",
+ es->name, timeval_float(&es->last_ts), es->last_seq,
+ timeval_float(&es->current_ts), es->current_seq,
elapsed, expected);
igt_assert_f(es->current_seq == es->last_seq + o->seq_step,
--
2.16.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_flip: Print timevals as float
2018-07-06 14:50 [igt-dev] [PATCH i-g-t] tests/kms_flip: Print timevals as float Ville Syrjala
@ 2018-07-06 14:56 ` Chris Wilson
2018-07-06 16:17 ` Ville Syrjälä
2018-07-06 17:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-07-07 16:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-07-06 14:56 UTC (permalink / raw)
To: Ville Syrjala, igt-dev
Quoting Ville Syrjala (2018-07-06 15:50:48)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Time intervals as produced by timersub() are normalized to have
> the tv_usec in the range 0-999999. That leads to very confusing
> looking debug output for negative interval. Eg. an interval
> of -0.1 seconds would be represented as tv_sec=-1, tv_usec=900000.
> Let's just convert the thing to a float seconds value and print
> that so that we'll get less confusing debug output.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> tests/kms_flip.c | 43 +++++++++++++++++++++++--------------------
> 1 file changed, 23 insertions(+), 20 deletions(-)
>
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 3d6fe948d3bb..393d690ab535 100644
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -125,23 +125,28 @@ struct event_state {
> int seq_step;
> };
>
> +static float timeval_float(const struct timeval *tv)
> +{
> + return tv->tv_sec + tv->tv_usec / 1000000.0f;
> +}
> +
> static void dump_event_state(const struct event_state *es)
> {
> igt_debug("name = %s\n"
> - "last_ts = %ld.%06ld\n"
> - "last_received_ts = %ld.%06ld\n"
> + "last_ts = %.06f\n"
> + "last_received_ts = %.06f\n"
Bikeshed time. We expect differences to be on the ms range, so
%.03fms and timeval_ms()?
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_flip: Print timevals as float
2018-07-06 14:56 ` Chris Wilson
@ 2018-07-06 16:17 ` Ville Syrjälä
0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-07-06 16:17 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
On Fri, Jul 06, 2018 at 03:56:06PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-07-06 15:50:48)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Time intervals as produced by timersub() are normalized to have
> > the tv_usec in the range 0-999999. That leads to very confusing
> > looking debug output for negative interval. Eg. an interval
> > of -0.1 seconds would be represented as tv_sec=-1, tv_usec=900000.
> > Let's just convert the thing to a float seconds value and print
> > that so that we'll get less confusing debug output.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > tests/kms_flip.c | 43 +++++++++++++++++++++++--------------------
> > 1 file changed, 23 insertions(+), 20 deletions(-)
> >
> > diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> > index 3d6fe948d3bb..393d690ab535 100644
> > --- a/tests/kms_flip.c
> > +++ b/tests/kms_flip.c
> > @@ -125,23 +125,28 @@ struct event_state {
> > int seq_step;
> > };
> >
> > +static float timeval_float(const struct timeval *tv)
> > +{
> > + return tv->tv_sec + tv->tv_usec / 1000000.0f;
> > +}
> > +
> > static void dump_event_state(const struct event_state *es)
> > {
> > igt_debug("name = %s\n"
> > - "last_ts = %ld.%06ld\n"
> > - "last_received_ts = %ld.%06ld\n"
> > + "last_ts = %.06f\n"
> > + "last_received_ts = %.06f\n"
>
> Bikeshed time. We expect differences to be on the ms range, so
> %.03fms and timeval_ms()?
I guess that might be a decent idea. Although it rather makes
me want to switch over to float msecs everywhere in the test.
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_flip: Print timevals as float
2018-07-06 14:50 [igt-dev] [PATCH i-g-t] tests/kms_flip: Print timevals as float Ville Syrjala
2018-07-06 14:56 ` Chris Wilson
@ 2018-07-06 17:31 ` Patchwork
2018-07-07 16:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-06 17:31 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: igt-dev
== Series Details ==
Series: tests/kms_flip: Print timevals as float
URL : https://patchwork.freedesktop.org/series/46081/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4445 -> IGTPW_1540 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46081/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1540 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_chamelium@hdmi-hpd-fast:
fi-kbl-7500u: SKIP -> FAIL (fdo#102672, fdo#103841)
igt@kms_flip@basic-flip-vs-dpms:
fi-skl-6700hq: PASS -> DMESG-WARN (fdo#105998)
igt@kms_frontbuffer_tracking@basic:
fi-bxt-j4205: PASS -> FAIL (fdo#103167)
fi-skl-6700hq: PASS -> FAIL (fdo#103167)
fi-bxt-dsi: PASS -> FAIL (fdo#103167)
fi-skl-6700k2: PASS -> FAIL (fdo#103167)
fi-kbl-7560u: PASS -> FAIL (fdo#103167)
fi-skl-6600u: PASS -> FAIL (fdo#103167)
fi-kbl-r: PASS -> FAIL (fdo#103167)
{fi-cfl-8109u}: NOTRUN -> FAIL (fdo#103167)
fi-skl-6260u: PASS -> FAIL (fdo#103167)
fi-skl-6770hq: PASS -> FAIL (fdo#103167)
fi-cfl-guc: PASS -> FAIL (fdo#103167)
fi-cfl-s3: PASS -> FAIL (fdo#103167)
fi-whl-u: PASS -> FAIL (fdo#103167)
fi-cfl-8700k: PASS -> FAIL (fdo#103167)
fi-kbl-7500u: PASS -> FAIL (fdo#103167)
fi-kbl-7567u: PASS -> FAIL (fdo#103167)
fi-skl-guc: PASS -> FAIL (fdo#103167)
fi-glk-j4005: PASS -> FAIL (fdo#103167)
fi-glk-dsi: PASS -> FAIL (fdo#103167)
fi-skl-gvtdvm: PASS -> FAIL (fdo#103167)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
{fi-cfl-8109u}: INCOMPLETE -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102672 https://bugs.freedesktop.org/show_bug.cgi?id=102672
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
== Participating hosts (47 -> 41) ==
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600
== Build changes ==
* IGT: IGT_4540 -> IGTPW_1540
CI_DRM_4445: 366234e5605ce58f732d2aeb83c713dde6b7c85c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1540: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1540/
IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1540/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread* [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_flip: Print timevals as float
2018-07-06 14:50 [igt-dev] [PATCH i-g-t] tests/kms_flip: Print timevals as float Ville Syrjala
2018-07-06 14:56 ` Chris Wilson
2018-07-06 17:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-07-07 16:49 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-07 16:49 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: igt-dev
== Series Details ==
Series: tests/kms_flip: Print timevals as float
URL : https://patchwork.freedesktop.org/series/46081/
State : failure
== Summary ==
= CI Bug Log - changes from IGT_4540_full -> IGTPW_1540_full =
== Summary - FAILURE ==
Serious unknown changes coming with IGTPW_1540_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1540_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46081/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1540_full:
=== IGT changes ===
==== Possible regressions ====
igt@kms_draw_crc@draw-method-xrgb8888-render-untiled:
shard-glk: PASS -> FAIL +4
shard-kbl: PASS -> FAIL +1
igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled:
shard-apl: PASS -> FAIL +1
==== Warnings ====
igt@gem_mocs_settings@mocs-rc6-ctx-render:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_1540_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_gtt:
shard-kbl: PASS -> FAIL (fdo#107127, fdo#105347)
igt@gem_ctx_isolation@vcs0-dirty-create:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#106023)
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
shard-glk: PASS -> FAIL (fdo#105703)
igt@kms_available_modes_crc@available_mode_test_crc:
shard-snb: PASS -> FAIL (fdo#106641)
igt@kms_cursor_legacy@cursor-vs-flip-atomic:
shard-hsw: PASS -> FAIL (fdo#103355)
igt@kms_draw_crc@draw-method-xrgb2101010-render-untiled:
shard-apl: PASS -> FAIL (fdo#103184) +2
igt@kms_draw_crc@draw-method-xrgb2101010-render-xtiled:
shard-kbl: PASS -> FAIL (fdo#103184) +2
igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled:
shard-apl: PASS -> FAIL (fdo#103232)
shard-glk: PASS -> FAIL (fdo#103232)
shard-kbl: PASS -> FAIL (fdo#103232)
igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
shard-glk: PASS -> FAIL (fdo#103060)
igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
shard-glk: PASS -> FAIL (fdo#100368) +1
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: PASS -> FAIL (fdo#103822) +1
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
shard-apl: PASS -> FAIL (fdo#103167) +5
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
shard-kbl: PASS -> FAIL (fdo#103167) +5
igt@kms_frontbuffer_tracking@fbc-2p-pri-indfb-multidraw:
shard-glk: PASS -> FAIL (fdo#103167) +10
==== Possible fixes ====
igt@kms_flip@2x-plain-flip-ts-check-interruptible:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: FAIL (fdo#102887, fdo#105363) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-indfb-fliptrack:
shard-snb: INCOMPLETE (fdo#105411) -> PASS
igt@kms_rotation_crc@sprite-rotation-180:
shard-snb: FAIL (fdo#103925) -> PASS
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS
igt@testdisplay:
shard-glk: INCOMPLETE (k.org#198133, fdo#103359) -> PASS
==== Warnings ====
igt@drv_selftest@live_gtt:
shard-apl: FAIL (fdo#107127, fdo#105347) -> INCOMPLETE (fdo#103927, fdo#107127)
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4540 -> IGTPW_1540
* Linux: CI_DRM_4443 -> CI_DRM_4445
CI_DRM_4443: 5c43ea095bbd1469a9c767529537ddf0434acc60 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4445: 366234e5605ce58f732d2aeb83c713dde6b7c85c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1540: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1540/
IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1540/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-07 16:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-06 14:50 [igt-dev] [PATCH i-g-t] tests/kms_flip: Print timevals as float Ville Syrjala
2018-07-06 14:56 ` Chris Wilson
2018-07-06 16:17 ` Ville Syrjälä
2018-07-06 17:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-07-07 16:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox