Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH igt 2/2] igt/debugfs_tests: Record which file is being opened in kmsg
Date: Wed, 6 Dec 2017 16:51:24 +0000	[thread overview]
Message-ID: <7cc551a7-556e-77d6-cee1-0e2e759269c0@linux.intel.com> (raw)
In-Reply-To: <20171206163804.26076-2-chris@chris-wilson.co.uk>


On 06/12/2017 16:38, Chris Wilson wrote:
> When tracking down the cause of a particular kernel warning, knowing
> which file it is associated with can be a big clue. So write the
> filename into the kernel message log prior to opening it.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/debugfs_test.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
> index 268d6e78f..2e87e4420 100644
> --- a/tests/debugfs_test.c
> +++ b/tests/debugfs_test.c
> @@ -61,8 +61,9 @@ static void read_and_discard_sysfs_entries(int path_fd, int indent)
>   			int sub_fd;
>   			ssize_t ret;
>   
> -			igt_set_timeout(5, "reading sysfs entry");
> +			igt_kmsg(KMSG_DEBUG "Reading file \"%s\"\n", dirent->d_name);
>   			igt_debug("%sReading file \"%s\"\n", tabs, dirent->d_name);
> +			igt_set_timeout(5, "reading sysfs entry");
>   
>   			sub_fd = openat(path_fd, dirent->d_name, O_RDONLY);
>   			if (sub_fd == -1) {
> 

If I may suggest an alternative - timestamp igt messages and write a log 
interleaver to be used with kernel log and igt log as inputs?

That would avoid having to sprinkle igt_kmsg over igt code base as more 
interesting scenarios are discovered.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-12-06 16:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 16:38 [PATCH igt 1/2] lib: Export kmsg() Chris Wilson
2017-12-06 16:38 ` [PATCH igt 2/2] igt/debugfs_tests: Record which file is being opened in kmsg Chris Wilson
2017-12-06 16:51   ` Tvrtko Ursulin [this message]
2017-12-06 17:02     ` Chris Wilson
2017-12-06 17:04       ` Tvrtko Ursulin
2017-12-06 17:08         ` Chris Wilson
2017-12-11 11:02       ` Joonas Lahtinen
2017-12-11 11:05         ` Chris Wilson
2017-12-06 17:33 ` ✓ Fi.CI.BAT: success for series starting with [1/2] lib: Export kmsg() Patchwork
2017-12-06 18:54 ` ✗ Fi.CI.IGT: warning " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2018-02-21 11:28 [PATCH igt 1/2] " Chris Wilson
2018-02-21 11:28 ` [PATCH igt 2/2] igt/debugfs_tests: Record which file is being opened in kmsg Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cc551a7-556e-77d6-cee1-0e2e759269c0@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox