From patchwork Sat May 19 20:34:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10413023 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C2C06037D for ; Sat, 19 May 2018 20:34:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D9EC286A0 for ; Sat, 19 May 2018 20:34:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62578286A2; Sat, 19 May 2018 20:34:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECB3C286A1 for ; Sat, 19 May 2018 20:34:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752472AbeESUeJ (ORCPT ); Sat, 19 May 2018 16:34:09 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:54934 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752462AbeESUeI (ORCPT ); Sat, 19 May 2018 16:34:08 -0400 Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9EAB71524; Sat, 19 May 2018 22:34:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1526762046; bh=wqtiomJwKl1aZeDCLs3//DFtKyQkCNjonU59co7TB04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EBWhvbxeaViR34/CwStlSKCM4xNrTwgBc32voirdF37QJCwXP1mj1MLbRdCggwn1E nFf6BK8Yr3IYckO6slfE0cVZ02o+g6OJ3RMXdbCA6Tm+CB/7qS6bTdCRZ7Pidg7Nvw Uj7lW5qw7nmXxicyrm4Q8ZMU/hE4gr3J4NSA3j+s= From: Laurent Pinchart To: linux-renesas-soc@vger.kernel.org Cc: kieran.bingham@ideasonboard.com Subject: [PATCH 1/2] vsp-lib: Capture the kernel log messages in test log files Date: Sat, 19 May 2018 23:34:25 +0300 Message-Id: <20180519203426.25711-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180519203426.25711-1-laurent.pinchart@ideasonboard.com> References: <20180519203426.25711-1-laurent.pinchart@ideasonboard.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 } test_start() { @@ -1086,6 +1089,8 @@ test_complete() { echo "Done: $1" | ./logger.sh >> $logfile echo $1 >&2 + dmesg -c | ./logger.sh kernel >> $logfile + rm -f ${frames_dir}frame-*.bin rm -f ${frames_dir}histo-*.bin rm -f ${frames_dir}rpf.*.bin