public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 4/4] vm_smoke_test: Add check for kernel module
Date: Fri, 9 Mar 2018 09:49:36 +0100	[thread overview]
Message-ID: <20180309094936.774e59dd@mmd1pvb1c.ad001.siemens.net> (raw)
In-Reply-To: <20180307104748.19409-1-asmirnov@ilbers.de>

I posted a patch that returns the sum of failures, might also be useful.

Henning

Am Wed, 7 Mar 2018 13:47:48 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> Check if example-module successfully loaded on boot. Also return
> non-zero code if some test failed.
> 
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
>  scripts/vm_smoke_test | 45
> ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38
> insertions(+), 7 deletions(-)
> 
> diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test
> index 7263cc4..60c78da 100755
> --- a/scripts/vm_smoke_test
> +++ b/scripts/vm_smoke_test
> @@ -6,13 +6,39 @@
>  CONSOLE_OUTPUT=/tmp/isar_console
>  PID_FILE=/tmp/qemu.pid
>  
> -check_output() {
> -    str=$(tail -1 $CONSOLE_OUTPUT)
> +RET=0
>  
> -    if [ "$str" = "isar login: " ]; then
> -        echo "Test: PASSED"
> +dump_boot_log() {
> +    echo "Boot log: 8<--"
> +    cat $CONSOLE_OUTPUT
> +    echo -e "\n8<--"
> +}
> +
> +check_login_prompt() {
> +    echo -n "Check login prompt: "
> +
> +    str=$(grep "isar login: " $CONSOLE_OUTPUT)
> +
> +    if [ -n "$str" ]; then
> +        echo "PASSED"
> +    else
> +        echo "FAIL"
> +        dump_boot_log
> +        RET=1
> +    fi
> +}
> +
> +check_example_module() {
> +    echo -n "Check example module: "
> +
> +    str=$(grep "Just an example" $CONSOLE_OUTPUT)
> +
> +    if [ -n "$str" ]; then
> +        echo "PASSED"
>      else
> -        echo "Test: FAIL"
> +        echo "FAIL"
> +        dump_boot_log
> +        RET=1
>      fi
>  }
>  
> @@ -28,8 +54,11 @@ run_test () {
>      sleep 30
>      kill `cat $PID_FILE`
>  
> -    # Check output
> -    check_output
> +    # Check login prompt
> +    check_login_prompt
> +
> +    # Check kernel module
> +    check_example_module
>  
>      # Clean up test artifacts
>      rm $CONSOLE_OUTPUT
> @@ -51,3 +80,5 @@ run_test i386 stretch
>  
>  # ARM64 machine
>  run_test arm64 stretch
> +
> +exit $RET


      reply	other threads:[~2018-03-09  8:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 12:40 [RFC][PATCH 0/4] Kernel module autoload Alexander Smirnov
2018-03-06 12:40 ` [PATCH 1/4] kernel/module: Add AUTOLOAD option Alexander Smirnov
2018-03-06 12:59   ` Jan Kiszka
2018-03-07  7:19   ` Jan Kiszka
2018-03-07  7:36     ` Alexander Smirnov
2018-03-07  7:39       ` Jan Kiszka
2018-03-07  8:13         ` Alexander Smirnov
2018-03-07 10:46   ` [PATCH v3 " Alexander Smirnov
2018-09-12 13:15     ` Henning Schild
2018-03-06 12:40 ` [PATCH 2/4] example-module: Do not return error on init Alexander Smirnov
2018-03-06 12:58   ` Jan Kiszka
2018-03-06 15:40   ` [PATCH v2 " Alexander Smirnov
2018-03-06 15:56     ` Jan Kiszka
2018-03-06 16:26       ` Alexander Smirnov
2018-03-06 12:40 ` [PATCH 3/4] example-module: Enable autoload Alexander Smirnov
2018-03-06 12:40 ` [PATCH 4/4] vm_smoke_test: Add check for kernel module Alexander Smirnov
2018-03-07 10:47   ` [PATCH v2 " Alexander Smirnov
2018-03-09  8:49     ` Henning Schild [this message]

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=20180309094936.774e59dd@mmd1pvb1c.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /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