From: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
To: cip-dev@lists.cip-project.org
Cc: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Subject: [isar-cip-core][PATCH v2 2/4] Add dmesg filter needed for lava test result
Date: Thu, 20 Jan 2022 21:54:16 +0900 [thread overview]
Message-ID: <20220120125418.236990-3-alice.ferrazzi@miraclelinux.com> (raw)
In-Reply-To: <20220120125418.236990-1-alice.ferrazzi@miraclelinux.com>
KernelCI is using a dmesg filter script for checking dmesg
logs result with lava.
Adding the script to the cip-core-image-kernelci.
Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
---
.../kernelci-customizations/files/dmesg.sh | 23 +++++++++++++++++++
.../kernelci-customizations.bb | 1 +
2 files changed, 24 insertions(+)
create mode 100644 recipes-core/kernelci-customizations/files/dmesg.sh
diff --git a/recipes-core/kernelci-customizations/files/dmesg.sh b/recipes-core/kernelci-customizations/files/dmesg.sh
new file mode 100644
index 0000000..3b096e1
--- /dev/null
+++ b/recipes-core/kernelci-customizations/files/dmesg.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+if [ "$KERNELCI_LAVA" = "y" ]; then
+ alias test-result='lava-test-case'
+else
+ alias test-result='echo'
+fi
+
+for level in crit alert emerg; do
+ dmesg --level=$level --notime -x -k > dmesg.$level
+ test -s dmesg.$level && res=fail || res=pass
+ count=$(cat dmesg.$level | wc -l)
+ cat dmesg.$level
+ test-result \
+ $level \
+ --result $res \
+ --measurement $count \
+ --units lines
+done
+
+exit 0
diff --git a/recipes-core/kernelci-customizations/kernelci-customizations.bb b/recipes-core/kernelci-customizations/kernelci-customizations.bb
index dca0891..c3f677c 100644
--- a/recipes-core/kernelci-customizations/kernelci-customizations.bb
+++ b/recipes-core/kernelci-customizations/kernelci-customizations.bb
@@ -18,6 +18,7 @@ DESCRIPTION = "CIP Core image demo & customizations"
SRC_URI = " \
file://postinst \
file://ethernet \
+ file://dmesg.sh \
file://99-silent-printk.conf"
DEPENDS += "sshd-regen-keys"
--
2.33.1
next prev parent reply other threads:[~2022-01-20 12:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 12:54 [isar-cip-core][PATCH v2 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
2022-01-20 12:54 ` [isar-cip-core][PATCH v2 1/4] Add cip-core-image-kernelci Alice Ferrazzi
2022-01-20 12:54 ` Alice Ferrazzi [this message]
2022-01-27 11:19 ` [isar-cip-core][PATCH v2 2/4] Add dmesg filter needed for lava test result Jan Kiszka
2022-01-27 13:09 ` Alice Ferrazzi
2022-01-27 15:38 ` Jan Kiszka
2022-01-20 12:54 ` [isar-cip-core][PATCH v2 3/4] Add script deploy-kernelci.py for upload the cip-core-image-kernelci Alice Ferrazzi
2022-01-20 12:54 ` [isar-cip-core][PATCH v2 4/4] enable cip-core-image-kernelci Alice Ferrazzi
2022-01-26 9:37 ` [isar-cip-core][PATCH v2 0/4] Add cip-core-image-kernelci building and uploading system Jan Kiszka
2022-01-26 10:27 ` Alice Ferrazzi
2022-01-26 10:37 ` Jan Kiszka
2022-01-26 11:43 ` Alice Ferrazzi
2022-01-26 11:49 ` Jan Kiszka
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=20220120125418.236990-3-alice.ferrazzi@miraclelinux.com \
--to=alice.ferrazzi@miraclelinux.com \
--cc=cip-dev@lists.cip-project.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