[igt-dev] [PATCH i-g-t] tests/pm_sseu: dump the bit of sysfs

Chris Wilson chris at chris-wilson.co.uk
Mon Feb 19 14:40:04 UTC 2018


Quoting Lionel Landwerlin (2018-02-19 14:36:03)
> We're seeing failures on the CI but we're missing the dump of what has
> been read to help us understand what's going wrong.
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  tests/pm_sseu.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/pm_sseu.c b/tests/pm_sseu.c
> index 2a2f06bb..4262ad2a 100644
> --- a/tests/pm_sseu.c
> +++ b/tests/pm_sseu.c
> @@ -143,7 +143,7 @@ dbg_get_bool(const char *first, const char *last, const char *name)
>  static void
>  dbg_get_status(struct status *stat)
>  {
> -       char *first, *last;
> +       char *tmp, *first, *last;
>         int nread;
>  
>         lseek(dbg.status_fd, 0, SEEK_SET);
> @@ -154,6 +154,9 @@ dbg_get_status(struct status *stat)
>         memset(stat, 0, sizeof(*stat));
>  
>         dbg_get_status_section("SSEU Device Info", &first, &last);

igt_debug("SSEU Device Info\n");

> +       for (tmp = first; tmp < last; tmp++)

C99 ftw, for (char *line = first; line < last; line++)
> +               igt_debug("%c", *tmp);

> +       igt_debug("\n");

Anyway, looks just to be the right information we need to take another
step towards debugging the following assertions,

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the igt-dev mailing list