From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com,
kvm-ppc@vger.kernel.org, lvivier@redhat.com, thuth@redhat.com,
drjones@redhat.com
Subject: Re: [kvm-unit-tests PATCH V4 1/5] scripts/runtime: Add ability to mark test as don't run by default
Date: Wed, 17 Aug 2016 17:01:52 +0200 [thread overview]
Message-ID: <20160817150152.GB22826@potion> (raw)
In-Reply-To: <1471416538-14088-1-git-send-email-sjitindarsingh@gmail.com>
2016-08-17 16:48+1000, Suraj Jitindar Singh:
> Invoking run_tests.sh without the -g parameter will by default run all of
> the tests for a given architecture. This patch series will add a test which
> has the ability to bring down the host and thus it might be nice if we
> double check that the user actually wants to run that test instead of
> them unknowingly bringing down a machine they might not want to.
>
> In order to do this add the option for a tests' group parameter in
> unittests.cfg to include "nodefault" on order to indicate that it shouldn't
> be run be default.
>
> When tests are invoked via run_tests.sh those with the nodefault group
> parameter will be skipped unless explicitly specified by the "-g" command
> line option. When tests with the nodefault group parameter are built and
> run standalone the user will be prompted on invocation to confirm that
> they actually want to run the test.
>
> This allows a developer to mark a test as having potentially adverse
> effects and thus requires an extra level of confirmation from the user
> before they are invoked. Existing functionality will be preserved and new
> tests can choose any group other than "nodefault" if they want to be run
> by default.
>
> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> ---
I have only nits, so
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> @@ -32,6 +32,25 @@ get_cmdline()
> +skip_nodefault()
> +{
> + [ "$STANDALONE" != "yes" ] && return 0
> +
> + while true; do
> + read -p "Test marked not to be run by default, are you sure (Y/N)? " yn
"y/N" would help to understand the default with "".
> + case $yn in
> + "Y" | "y" | "Yes" | "yes")
> + return 1
> + ;;
> + "" | "N" | "n" | "No" | "no" | "q" | "quit" | "exit")
> + return 0
> + ;;
> + *)
> + ;;
The "*) ;;" case doesn't have to be there.
> + esac
> + done
> +}
> +
next prev parent reply other threads:[~2016-08-17 15:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 6:48 [kvm-unit-tests PATCH V4 1/5] scripts/runtime: Add ability to mark test as don't run by default Suraj Jitindar Singh
2016-08-17 6:48 ` [kvm-unit-tests PATCH V4 2/5] lib/powerpc: Add generic decrementer exception handler Suraj Jitindar Singh
2016-08-17 6:48 ` [kvm-unit-tests PATCH V4 3/5] lib/powerpc: Add function to start secondary threads Suraj Jitindar Singh
2016-08-17 7:44 ` Thomas Huth
2016-08-18 3:59 ` Suraj Jitindar Singh
2016-08-17 6:48 ` [kvm-unit-tests PATCH V4 4/5] lib/powerpc: Implement generic delay function for use in unit tests Suraj Jitindar Singh
2016-08-17 8:19 ` Thomas Huth
2016-08-18 4:41 ` Suraj Jitindar Singh
2016-08-17 13:04 ` Andrew Jones
2016-08-18 4:39 ` Suraj Jitindar Singh
2016-08-18 10:24 ` Andrew Jones
2016-08-19 0:41 ` Suraj Jitindar Singh
2016-08-17 6:48 ` [kvm-unit-tests PATCH V4 5/5] powerpc/tm: Add a test for H_CEDE while tm suspended Suraj Jitindar Singh
2016-08-17 8:31 ` Thomas Huth
2016-08-17 12:11 ` [kvm-unit-tests PATCH V4 1/5] scripts/runtime: Add ability to mark test as don't run by default Andrew Jones
2016-08-17 15:01 ` Radim Krčmář [this message]
2016-08-18 4:46 ` Suraj Jitindar Singh
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=20160817150152.GB22826@potion \
--to=rkrcmar@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=sjitindarsingh@gmail.com \
--cc=thuth@redhat.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