Skip to contentSkip to conversation

Groups are separated by spaces

PATCH Applied Andrew Jones 3 participants 6 messages Nov 12, 2021 – Nov 16, 2021 KVM

lore
Share & tools
lore
#0 lore raw

cover Groups are separated by spaces

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(-)
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/2 unittests.cfg: groups should be space separated

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.

---
 README.md         | 2 +-
 arm/unittests.cfg | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
README.md +1 -1
index b498aafd1a77..6e6a9d0429bc 100644
@@ -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`
 
arm/unittests.cfg +1 -1
index f776b66ef96d..945c2d074719 100644
@@ -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
 
Signature · 1 line
2.31.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH kvm-unit-tests 1/2] unittests.cfg: groups should be space separated

Quoted 39 lines · Andrew Jones

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.

---
 README.md         | 2 +-
 arm/unittests.cfg | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
README.md +1 -1
index b498aafd1a77..6e6a9d0429bc 100644
@@ -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`
 
arm/unittests.cfg +1 -2
index f776b66ef96d..945c2d074719 100644
@@ -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
 
--
Quoted 2 lines

2.31.1

#3 lore raw

PATCH 2/2 runtime: Use find_word with groups

In reply to Andrew Jones

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.

---
 scripts/runtime.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/runtime.bash +1 -1
index 132389c7dd59..4deb41ca251c 100644
@@ -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
Signature · 1 line
2.31.1
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH kvm-unit-tests 2/2] runtime: Use find_word with groups

Quoted 25 lines · Andrew Jones

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.

---
 scripts/runtime.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/runtime.bash +1 -2
index 132389c7dd59..4deb41ca251c 100644
@@ -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
--
Quoted 2 lines

2.31.1

maintainer Applied
#5 lore raw
In reply to Andrew Jones
Quoted 12 lines · Andrew Jones

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