From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 2/3] scripts/vm_smoke_test: Check if QEMU didn't start
Date: Wed, 2 May 2018 10:36:55 +0200 [thread overview]
Message-ID: <20180502103655.7eca8bf2@md1pvb1c.ad001.siemens.net> (raw)
In-Reply-To: <20180501175511.26145-3-asmirnov@ilbers.de>
Am Tue, 1 May 2018 20:55:10 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> Add check for QEMU start and display error message if it didn't start.
>
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
> scripts/vm_smoke_test | 31 +++++++++++++++++++++----------
> 1 file changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test
> index 92fda2d..006ab53 100755
> --- a/scripts/vm_smoke_test
> +++ b/scripts/vm_smoke_test
> @@ -57,21 +57,32 @@ run_test () {
>
> # Start QEMU with Isar image
> start_vm -a $ARCH -d $DISTRO -o $CONSOLE_OUTPUT -p $PID_FILE
> > /dev/null 2>&1 &
> - sleep 60
> - kill `cat $PID_FILE`
> + sleep 5
>
> - FAIL=0
> + if [ -z `ps -p $! -o pid=` ]; then
[ -d /proc/$! ]
> + echo "QEMU start: FAILED"
> + RET=$ES_FAIL
> + echo "Command output:\n8<--"
> + start_vm -a $ARCH -d $DISTRO -o $CONSOLE_OUTPUT -p $PID_FILE
> + echo "\n8<--"
> + else
> + sleep 60
> + kill `cat $PID_FILE`
> +
> + FAIL=0
>
> - # Check login prompt
> - check_login_prompt
> + # Check login prompt
> + check_login_prompt
i think the function name says all there is to say
> - # Check kernel module
> - check_example_module
> + # Check kernel module
> + check_example_module
same here
Henning
> - [ $VERBOSE -eq 1 -o $FAIL -eq 1 ] && dump_boot_log
> + [ $VERBOSE -eq 1 -o $FAIL -eq 1 ] && dump_boot_log
> +
> + # Clean up test artifacts
> + rm $CONSOLE_OUTPUT
> + fi
>
> - # Clean up test artifacts
> - rm $CONSOLE_OUTPUT
> rm $PID_FILE
> }
>
next prev parent reply other threads:[~2018-05-02 8:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 17:55 [PATCH 0/3] Update scripts Alexander Smirnov
2018-05-01 17:55 ` [PATCH 1/3] scripts/vm_smoke_test: Add verbosity parameter Alexander Smirnov
2018-05-02 8:30 ` Henning Schild
2018-05-01 17:55 ` [PATCH 2/3] scripts/vm_smoke_test: Check if QEMU didn't start Alexander Smirnov
2018-05-02 8:36 ` Henning Schild [this message]
2018-05-01 17:55 ` [PATCH 3/3] scripts/ci_build: Make CI script more generic Alexander Smirnov
2018-05-02 8:39 ` Henning Schild
2018-05-02 8:42 ` [PATCH 0/3] Update scripts Henning Schild
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=20180502103655.7eca8bf2@md1pvb1c.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