From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: linux-renesas-soc@vger.kernel.org, kieran.bingham@ideasonboard.com
Subject: Re: [PATCH 1/2] vsp-lib: Capture the kernel log messages in test log files
Date: Mon, 21 May 2018 11:59:48 +0300 [thread overview]
Message-ID: <1663055.khoy9BkJL7@avalon> (raw)
In-Reply-To: <20180520104753.GA5115@bigcity.dyn.berto.se>
Hi Niklas,
On Sunday, 20 May 2018 13:47:53 EEST Niklas Söderlund wrote:
> On 2018-05-19 23:34:25 +0300, Laurent Pinchart wrote:
> > It can be useful to capture kernel log messages in test log files for
> > diagnostic purpose. Add a simple mechanism to do so by capturing the
> > full kernel log at the end of the test. The kernel log is cleared first
> > before starting the test to avoid capturing unrelated messages.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >
> > scripts/vsp-lib.sh | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
> > index 0f3992a7827e..e672686a377e 100755
> > --- a/scripts/vsp-lib.sh
> > +++ b/scripts/vsp-lib.sh
> > @@ -1075,6 +1075,9 @@ test_init() {
> >
> > echo "Using device $mdev ($dev)" | ./logger.sh config >> $logfile
> >
> > vsp_runner=./vsp-runner.sh
> >
> > +
> > + # Clear the kernel log
> > + dmesg -c > /dev/null
>
> I agree it's useful to capture the kernel log messages during a test, I
> did the same thing in vin-tests. What I did learn was that when
> something do go wrong you kind of want the whole kernel log from boot
> and truncating it could be annoying. Just the other day I got feed up
> with this in vin-tests and found a different way, as it's still fresh in
> my memory maybe it could be useful for you too, or not :-)
>
> marker=$(dmesg | tail -n 1 | sed 's/^\[\([^]]*\)\].*/\1/g')
>
> > }
> >
> > test_start() {
> >
> > @@ -1086,6 +1089,8 @@ test_complete() {
> >
> > echo "Done: $1" | ./logger.sh >> $logfile
> > echo $1 >&2
> >
> > + dmesg -c | ./logger.sh kernel >> $logfile
> > +
>
> dmesg | sed "1,/$marker/d" | ./logger.sh kernel >> $logfile
That's a good idea. I gave it a try and it worked, I'll send a v2.
> > rm -f ${frames_dir}frame-*.bin
> > rm -f ${frames_dir}histo-*.bin
> > rm -f ${frames_dir}rpf.*.bin
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2018-05-21 8:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-19 20:34 [PATCH 0/2] vsp-tests: Fix suspend/resume test Laurent Pinchart
2018-05-19 20:34 ` [PATCH 1/2] vsp-lib: Capture the kernel log messages in test log files Laurent Pinchart
2018-05-20 10:47 ` Niklas Söderlund
2018-05-21 8:59 ` Laurent Pinchart [this message]
2018-05-19 20:34 ` [PATCH 2/2] tests: suspend/resume: Increase number of processed frames Laurent Pinchart
2018-05-21 8:16 ` Kieran Bingham
2018-05-21 8:51 ` Laurent Pinchart
2018-05-21 8:58 ` Kieran Bingham
2018-05-21 9:09 ` Laurent Pinchart
2018-05-21 9:12 ` Kieran Bingham
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=1663055.khoy9BkJL7@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
/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