From patchwork Tue Apr 20 01:52:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1468154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FPRXb2fhKz9vDV for ; Tue, 20 Apr 2021 11:53:01 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lYfZP-0005XM-U9; Tue, 20 Apr 2021 01:52:55 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYfZO-0005X4-F8 for fwts-devel@lists.ubuntu.com; Tue, 20 Apr 2021 01:52:54 +0000 Received: from [104.157.111.226] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYfZO-0004XQ-02; Tue, 20 Apr 2021 01:52:54 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/2] oops: add "kernel BUG" to oops test Date: Mon, 19 Apr 2021 19:52:48 -0600 Message-Id: <20210420015249.181241-1-alex.hung@canonical.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- src/lib/src/fwts_oops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/src/fwts_oops.c b/src/lib/src/fwts_oops.c index 6221f93e..860df92d 100644 --- a/src/lib/src/fwts_oops.c +++ b/src/lib/src/fwts_oops.c @@ -57,6 +57,8 @@ static void fwts_klog_stack_dump( if (strstr(line, "Oops:")) dumpable |= FWTS_OOPS_GOT_OOPS; + if (strstr(line, "kernel BUG at")) + dumpable |= FWTS_OOPS_GOT_OOPS; if (strstr(line, "WARNING: at")) dumpable |= FWTS_OOPS_GOT_WARN_ON; if (strstr(line, "Call Trace:")) @@ -129,6 +131,7 @@ int fwts_oops_check(fwts_framework *fw, fwts_list *klog, int *oopses, int *warn_ fwts_list_foreach(item, klog) { char *line = fwts_klog_remove_timestamp(fwts_list_data(char *, item)); if ((strncmp("BUG:", line, 4) == 0) || + (strncmp("kernel BUG", line, 10) == 0) || (strncmp("WARNING:", line, 8) == 0)) fwts_klog_stack_dump(fw, item, oopses, warn_ons); }