Message ID | 20220120125418.236990-3-alice.ferrazzi@miraclelinux.com (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | Add cip-core-image-kernelci building and uploading system | expand |
On 20.01.22 13:54, Alice Ferrazzi wrote: > 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" This is a nop, you forgot to install it. Where should that script actually end up? Jan
On Thu, Jan 27, 2022 at 8:19 PM Jan Kiszka <jan.kiszka@siemens.com> wrote: > > On 20.01.22 13:54, Alice Ferrazzi wrote: > > 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" > > This is a nop, you forgot to install it. > > Where should that script actually end up? you are right. The installation script got lost in the rebase. sending a patch v3 -- ====================================== Cybertrust Japan Co.,Ltd. Alice Ferrazzi alice.ferrazzi@miraclelinux.com ======================================
On 27.01.22 14:09, Alice Ferrazzi wrote: > On Thu, Jan 27, 2022 at 8:19 PM Jan Kiszka <jan.kiszka@siemens.com> wrote: >> >> On 20.01.22 13:54, Alice Ferrazzi wrote: >>> 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" >> >> This is a nop, you forgot to install it. >> >> Where should that script actually end up? > > you are right. > The installation script got lost in the rebase. > sending a patch v3 > Found the missing bits: install -v -d ${D}/opt/kernelci install -v -m 744 ${WORKDIR}/dmesg.sh ${D}/opt/kernelci/ I can add them to your patch if you prefer. Jan
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"
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