From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
kvm@vger.kernel.org, pbonzini@redhat.com,
kvm-ppc@vger.kernel.org, lvivier@redhat.com, thuth@redhat.com
Subject: Re: [kvm-unit-tests PATCH V3 1/5] scripts/runtime: Add ability to mark test as don't run by default
Date: Tue, 16 Aug 2016 16:03:50 +0000 [thread overview]
Message-ID: <20160816160349.GD12385@potion> (raw)
In-Reply-To: <20160816120037.32l5sezhhsgtldxa@kamzik.localdomain>
2016-08-16 14:00+0200, Andrew Jones:
> On Tue, Aug 16, 2016 at 05:18:11PM +1000, Suraj Jitindar Singh wrote:
>> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
>> @@ -32,6 +32,26 @@ get_cmdline()
>> +skip_nodefault()
>> +{
>> + while true; do
>> + read -p "Test marked not to be run by default, are you sure (Y/N)? " yn
I'd write "run this test" instead of "are you sure", or something
similar for the question. The user can be sure that the has is marked
with nodefault. ;)
>> + case $yn in
>> + "Y" | "y" | "Yes" | "yes")
>
> What about "YES" :-)
And exclamation marks!
"YES!!!"
> Actually, I'd just accept 'Y' for yes, and nothing else, like the prompt says.
NO. If it is only one value, then make it "y".
motto: saving the Earth, one shift at a time.
This kind of user interface usually accepts at least "[yY]|[yY]es" ...
users will already be pissed that they have to input something and
denying a perfectly logical "yes" (which is what "y" stands for) is
going too overboard, IMO.
> And, instead of looping for valid input, all other input can just mean no.
"y/N" is the convention for writing a bool question that defaults to no.
I'd accept "" (just enter) as the default and then, looping isn't
unexpected and user already typed some crap in that case, so they
probably want to answer the question without having to run the command
again.
>> + return 1
>> + ;;
>> + "N" | "n" | "No" | "no" | "q" | "quit" | "exit")
>
> We should output something when the answer is 'no' like "User aborted",
> or whatever.
>
>> + exit
Wouldn't "return 1" and the SKIP message be enough?
>> + ;;
>> + *)
>> + echo Please select Y or N
Just asking the question again is more common -- it's not hard to figure
out that the answer was not accepted.
WARNING: multiple messages have this Message-ID (diff)
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
kvm@vger.kernel.org, pbonzini@redhat.com,
kvm-ppc@vger.kernel.org, lvivier@redhat.com, thuth@redhat.com
Subject: Re: [kvm-unit-tests PATCH V3 1/5] scripts/runtime: Add ability to mark test as don't run by default
Date: Tue, 16 Aug 2016 18:03:50 +0200 [thread overview]
Message-ID: <20160816160349.GD12385@potion> (raw)
In-Reply-To: <20160816120037.32l5sezhhsgtldxa@kamzik.localdomain>
2016-08-16 14:00+0200, Andrew Jones:
> On Tue, Aug 16, 2016 at 05:18:11PM +1000, Suraj Jitindar Singh wrote:
>> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
>> @@ -32,6 +32,26 @@ get_cmdline()
>> +skip_nodefault()
>> +{
>> + while true; do
>> + read -p "Test marked not to be run by default, are you sure (Y/N)? " yn
I'd write "run this test" instead of "are you sure", or something
similar for the question. The user can be sure that the has is marked
with nodefault. ;)
>> + case $yn in
>> + "Y" | "y" | "Yes" | "yes")
>
> What about "YES" :-)
And exclamation marks!
"YES!!!"
> Actually, I'd just accept 'Y' for yes, and nothing else, like the prompt says.
NO. If it is only one value, then make it "y".
motto: saving the Earth, one shift at a time.
This kind of user interface usually accepts at least "[yY]|[yY]es" ...
users will already be pissed that they have to input something and
denying a perfectly logical "yes" (which is what "y" stands for) is
going too overboard, IMO.
> And, instead of looping for valid input, all other input can just mean no.
"y/N" is the convention for writing a bool question that defaults to no.
I'd accept "" (just enter) as the default and then, looping isn't
unexpected and user already typed some crap in that case, so they
probably want to answer the question without having to run the command
again.
>> + return 1
>> + ;;
>> + "N" | "n" | "No" | "no" | "q" | "quit" | "exit")
>
> We should output something when the answer is 'no' like "User aborted",
> or whatever.
>
>> + exit
Wouldn't "return 1" and the SKIP message be enough?
>> + ;;
>> + *)
>> + echo Please select Y or N
Just asking the question again is more common -- it's not hard to figure
out that the answer was not accepted.
next prev parent reply other threads:[~2016-08-16 16:03 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 7:18 [kvm-unit-tests PATCH V3 1/5] scripts/runtime: Add ability to mark test as don't run by default Suraj Jitindar Singh
2016-08-16 7:18 ` Suraj Jitindar Singh
2016-08-16 7:18 ` [kvm-unit-tests PATCH V3 2/5] lib/powerpc: Add generic decrementer exception handler Suraj Jitindar Singh
2016-08-16 7:18 ` Suraj Jitindar Singh
2016-08-16 12:05 ` Andrew Jones
2016-08-16 12:05 ` Andrew Jones
2016-08-16 7:18 ` [kvm-unit-tests PATCH V3 3/5] lib/powerpc: Add function to start secondary threads Suraj Jitindar Singh
2016-08-16 7:18 ` Suraj Jitindar Singh
2016-08-16 12:27 ` Andrew Jones
2016-08-16 12:27 ` Andrew Jones
2016-08-17 4:18 ` Suraj Jitindar Singh
2016-08-17 4:18 ` Suraj Jitindar Singh
2016-08-16 7:18 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit tests Suraj Jitindar Singh
2016-08-16 7:18 ` Suraj Jitindar Singh
2016-08-16 12:41 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit test Andrew Jones
2016-08-16 12:41 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit tests Andrew Jones
2016-08-17 4:57 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit test Suraj Jitindar Singh
2016-08-17 4:57 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit tests Suraj Jitindar Singh
2016-08-16 12:54 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit test Thomas Huth
2016-08-16 12:54 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit tests Thomas Huth
2016-08-17 5:02 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit test Suraj Jitindar Singh
2016-08-17 5:02 ` [kvm-unit-tests PATCH V3 4/5] lib/powerpc: Implement generic sleep function for use in unit tests Suraj Jitindar Singh
2016-08-16 7:18 ` [kvm-unit-tests PATCH V3 5/5] powerpc/tm: Add a test for H_CEDE while tm suspended Suraj Jitindar Singh
2016-08-16 7:18 ` Suraj Jitindar Singh
2016-08-16 12:57 ` Andrew Jones
2016-08-16 12:57 ` Andrew Jones
2016-08-17 6:07 ` Suraj Jitindar Singh
2016-08-17 6:07 ` Suraj Jitindar Singh
2016-08-16 12:00 ` [kvm-unit-tests PATCH V3 1/5] scripts/runtime: Add ability to mark test as don't run by default Andrew Jones
2016-08-16 12:00 ` Andrew Jones
2016-08-16 16:03 ` Radim Krčmář [this message]
2016-08-16 16:03 ` Radim Krčmář
2016-08-17 3:35 ` Suraj Jitindar Singh
2016-08-17 3:35 ` Suraj Jitindar Singh
2016-08-17 3:14 ` Suraj Jitindar Singh
2016-08-17 3:14 ` 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=20160816160349.GD12385@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.