kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH kvm-unit-tests 0/2] Groups are separated by spaces
@ 2021-11-12 13:37 Andrew Jones
  2021-11-12 13:37 ` [PATCH kvm-unit-tests 1/2] unittests.cfg: groups should be space separated Andrew Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew Jones @ 2021-11-12 13:37 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, thuth, marcorr, zxwang42

I wrote these patches quite a while ago and forgot to send them. Sending
now, now that I rediscovered them.

Andrew Jones (2):
  unittests.cfg: groups should be space separated
  runtime: Use find_word with groups

 README.md            | 2 +-
 arm/unittests.cfg    | 2 +-
 scripts/runtime.bash | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH kvm-unit-tests 1/2] unittests.cfg: groups should be space separated
  2021-11-12 13:37 [PATCH kvm-unit-tests 0/2] Groups are separated by spaces Andrew Jones
@ 2021-11-12 13:37 ` Andrew Jones
  2021-11-12 15:37   ` Marc Orr
  2021-11-12 13:37 ` [PATCH kvm-unit-tests 2/2] runtime: Use find_word with groups Andrew Jones
  2021-11-16 10:35 ` [PATCH kvm-unit-tests 0/2] Groups are separated by spaces Paolo Bonzini
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew Jones @ 2021-11-12 13:37 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, thuth, marcorr, zxwang42

As specified in the comment blocks at the tops of the unittests.cfg
files, multiple groups assigned to 'groups' should be space separated.
Currently any nonword character works for the deliminator, but the
implementation may change. Stick to the specs.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 README.md         | 2 +-
 arm/unittests.cfg | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index b498aafd1a77..6e6a9d0429bc 100644
--- a/README.md
+++ b/README.md
@@ -101,7 +101,7 @@ host. kvm-unit-tests provides two ways to handle tests like those.
      a) independently, `ARCH-run ARCH/test`
 
      b) by specifying any other non-nodefault group it is in,
-        groups = nodefault,mygroup : `./run_tests.sh -g mygroup`
+        groups = nodefault mygroup : `./run_tests.sh -g mygroup`
 
      c) by specifying all tests should be run, `./run_tests.sh -a`
 
diff --git a/arm/unittests.cfg b/arm/unittests.cfg
index f776b66ef96d..945c2d074719 100644
--- a/arm/unittests.cfg
+++ b/arm/unittests.cfg
@@ -232,7 +232,7 @@ arch = arm64
 [micro-bench]
 file = micro-bench.flat
 smp = 2
-groups = nodefault,micro-bench
+groups = nodefault micro-bench
 accel = kvm
 arch = arm64
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH kvm-unit-tests 2/2] runtime: Use find_word with groups
  2021-11-12 13:37 [PATCH kvm-unit-tests 0/2] Groups are separated by spaces Andrew Jones
  2021-11-12 13:37 ` [PATCH kvm-unit-tests 1/2] unittests.cfg: groups should be space separated Andrew Jones
@ 2021-11-12 13:37 ` Andrew Jones
  2021-11-12 15:47   ` Marc Orr
  2021-11-16 10:35 ` [PATCH kvm-unit-tests 0/2] Groups are separated by spaces Paolo Bonzini
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew Jones @ 2021-11-12 13:37 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, thuth, marcorr, zxwang42

Groups are space separated, so we can remove the 'grep -w', which has
caused problems in the past with testnames, see b373304853a0
("scripts: Fix the check whether testname is in the only_tests list")
and use find_word.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 scripts/runtime.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index 132389c7dd59..4deb41ca251c 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -132,7 +132,7 @@ function run()
     }
 
     cmdline=$(get_cmdline $kernel)
-    if grep -qw "migration" <<<$groups ; then
+    if find_word "migration" "$groups"; then
         cmdline="MIGRATION=yes $cmdline"
     fi
     if [ "$verbose" = "yes" ]; then
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH kvm-unit-tests 1/2] unittests.cfg: groups should be space separated
  2021-11-12 13:37 ` [PATCH kvm-unit-tests 1/2] unittests.cfg: groups should be space separated Andrew Jones
@ 2021-11-12 15:37   ` Marc Orr
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Orr @ 2021-11-12 15:37 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvm, pbonzini, thuth, zxwang42

On Fri, Nov 12, 2021 at 5:37 AM Andrew Jones <drjones@redhat.com> wrote:
>
> As specified in the comment blocks at the tops of the unittests.cfg
> files, multiple groups assigned to 'groups' should be space separated.
> Currently any nonword character works for the deliminator, but the
> implementation may change. Stick to the specs.
>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  README.md         | 2 +-
>  arm/unittests.cfg | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/README.md b/README.md
> index b498aafd1a77..6e6a9d0429bc 100644
> --- a/README.md
> +++ b/README.md
> @@ -101,7 +101,7 @@ host. kvm-unit-tests provides two ways to handle tests like those.
>       a) independently, `ARCH-run ARCH/test`
>
>       b) by specifying any other non-nodefault group it is in,
> -        groups = nodefault,mygroup : `./run_tests.sh -g mygroup`
> +        groups = nodefault mygroup : `./run_tests.sh -g mygroup`
>
>       c) by specifying all tests should be run, `./run_tests.sh -a`
>
> diff --git a/arm/unittests.cfg b/arm/unittests.cfg
> index f776b66ef96d..945c2d074719 100644
> --- a/arm/unittests.cfg
> +++ b/arm/unittests.cfg
> @@ -232,7 +232,7 @@ arch = arm64
>  [micro-bench]
>  file = micro-bench.flat
>  smp = 2
> -groups = nodefault,micro-bench
> +groups = nodefault micro-bench
>  accel = kvm
>  arch = arm64
>
> --
> 2.31.1
>

Reviewed-by: Marc Orr <marcorr@google.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH kvm-unit-tests 2/2] runtime: Use find_word with groups
  2021-11-12 13:37 ` [PATCH kvm-unit-tests 2/2] runtime: Use find_word with groups Andrew Jones
@ 2021-11-12 15:47   ` Marc Orr
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Orr @ 2021-11-12 15:47 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvm, pbonzini, thuth, zxwang42

On Fri, Nov 12, 2021 at 5:37 AM Andrew Jones <drjones@redhat.com> wrote:
>
> Groups are space separated, so we can remove the 'grep -w', which has
> caused problems in the past with testnames, see b373304853a0
> ("scripts: Fix the check whether testname is in the only_tests list")
> and use find_word.
>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  scripts/runtime.bash | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> index 132389c7dd59..4deb41ca251c 100644
> --- a/scripts/runtime.bash
> +++ b/scripts/runtime.bash
> @@ -132,7 +132,7 @@ function run()
>      }
>
>      cmdline=$(get_cmdline $kernel)
> -    if grep -qw "migration" <<<$groups ; then
> +    if find_word "migration" "$groups"; then
>          cmdline="MIGRATION=yes $cmdline"
>      fi
>      if [ "$verbose" = "yes" ]; then
> --
> 2.31.1
>

Reviewed-by: Marc Orr <marcorr@google.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH kvm-unit-tests 0/2] Groups are separated by spaces
  2021-11-12 13:37 [PATCH kvm-unit-tests 0/2] Groups are separated by spaces Andrew Jones
  2021-11-12 13:37 ` [PATCH kvm-unit-tests 1/2] unittests.cfg: groups should be space separated Andrew Jones
  2021-11-12 13:37 ` [PATCH kvm-unit-tests 2/2] runtime: Use find_word with groups Andrew Jones
@ 2021-11-16 10:35 ` Paolo Bonzini
  2 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2021-11-16 10:35 UTC (permalink / raw)
  To: Andrew Jones, kvm; +Cc: thuth, marcorr, zxwang42

On 11/12/21 14:37, Andrew Jones wrote:
> I wrote these patches quite a while ago and forgot to send them. Sending
> now, now that I rediscovered them.
> 
> Andrew Jones (2):
>    unittests.cfg: groups should be space separated
>    runtime: Use find_word with groups
> 
>   README.md            | 2 +-
>   arm/unittests.cfg    | 2 +-
>   scripts/runtime.bash | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)
> 

Queued, thanks.

Paolo


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-16 10:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 13:37 [PATCH kvm-unit-tests 0/2] Groups are separated by spaces Andrew Jones
2021-11-12 13:37 ` [PATCH kvm-unit-tests 1/2] unittests.cfg: groups should be space separated Andrew Jones
2021-11-12 15:37   ` Marc Orr
2021-11-12 13:37 ` [PATCH kvm-unit-tests 2/2] runtime: Use find_word with groups Andrew Jones
2021-11-12 15:47   ` Marc Orr
2021-11-16 10:35 ` [PATCH kvm-unit-tests 0/2] Groups are separated by spaces Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).