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 2/4] Add dmesg filter needed for lava test result
Date: Thu, 6 Jan 2022 20:16:12 +0900 [thread overview]
Message-ID: <20220106111614.218823-3-alice.ferrazzi@miraclelinux.com> (raw)
In-Reply-To: <20220106111614.218823-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-06 11:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 11:16 [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
2022-01-06 11:16 ` [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci Alice Ferrazzi
2022-01-06 14:01 ` Jan Kiszka
2022-01-07 10:16 ` Alice Ferrazzi
2022-01-06 11:16 ` Alice Ferrazzi [this message]
2022-01-06 11:16 ` [isar-cip-core][PATCH 3/4] Add script deploy-kernelci.py for upload the cip-core-image-kernelci Alice Ferrazzi
2022-01-06 11:16 ` [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci Alice Ferrazzi
2022-01-06 14:12 ` Jan Kiszka
2022-01-07 10:02 ` Alice Ferrazzi
2022-01-07 10:07 ` Jan Kiszka
2022-01-07 10:23 ` Alice Ferrazzi
2022-01-07 11:18 ` Jan Kiszka
2022-01-07 13:40 ` Alice Ferrazzi
2022-01-07 13:46 ` Jan Kiszka
2022-01-06 13:43 ` [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Jan Kiszka
2022-01-06 14:18 ` Jan Kiszka
2022-01-07 9:57 ` Alice Ferrazzi
2022-01-07 10:10 ` Jan Kiszka
2022-01-07 10:20 ` Alice Ferrazzi
[not found] ` <CANgtXuPc0_27ZCR7au1e-C3y+-7De-nZQ2ddmjKAinT7Cm09_A@mail.gmail.com>
2022-01-07 10:22 ` 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=20220106111614.218823-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