From patchwork Thu Oct 6 13:36:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 9364815 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 EE595607D3 for ; Thu, 6 Oct 2016 13:36:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFF8228FA2 for ; Thu, 6 Oct 2016 13:36:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4A152901F; Thu, 6 Oct 2016 13:36:20 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2CD0628FA2 for ; Thu, 6 Oct 2016 13:36:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6124C6E9A7; Thu, 6 Oct 2016 13:36:16 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEF366E9A7 for ; Thu, 6 Oct 2016 13:36:14 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 06 Oct 2016 06:36:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,454,1473145200"; d="scan'208"; a="1061283747" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga002.jf.intel.com with SMTP; 06 Oct 2016 06:36:12 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 06 Oct 2016 16:36:11 +0300 From: ville.syrjala@linux.intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 6 Oct 2016 16:36:05 +0300 Message-Id: <1475760968-3213-2-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475760968-3213-1-git-send-email-ville.syrjala@linux.intel.com> References: <1475760968-3213-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t 2/5] tests: Leave basic breadcrumbs in dmesg for shell script based tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä Leave the normal "executing" and "exiting" breadcrumbs into dmesg when running the test. Signed-off-by: Ville Syrjälä --- tests/drm_lib.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh index 0eeab1c183c9..456040e1971f 100755 --- a/tests/drm_lib.sh +++ b/tests/drm_lib.sh @@ -3,6 +3,30 @@ SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )" . $SOURCE_DIR/drm_getopt.sh +NAME=$(basename "$0") + +KERN_EMER="<0>" +KERN_ALERT="<1>" +KERN_CRIT="<2>" +KERN_ERR="<3>" +KERN_WARNING="<4>" +KERN_NOTICE="<5>" +KERN_INFO="<6>" +KERN_DEBUG="<7>" + +kmsg() { + echo "$1" > /dev/kmsg +} + +finish() { + exitcode=$? + kmsg "$KERN_INFO$NAME: exiting, ret=$exitcode" + exit $exitcode +} +trap finish EXIT + +kmsg "$KERN_INFO$NAME: executing" + skip() { echo "$@" exit $IGT_EXIT_SKIP