* [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes
@ 2025-07-11 9:14 Mathias Krause
2025-07-11 9:14 ` [kvm-unit-tests PATCH 1/2] scripts: Fix typo for multi-line params match Mathias Krause
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mathias Krause @ 2025-07-11 9:14 UTC (permalink / raw)
To: Andrew Jones; +Cc: Alexandru Elisei, kvm, Mathias Krause
Hi,
these two patches fix issues with the kvmtool support series[1] recently
merged.
Please apply!
[1] https://lore.kernel.org/kvm/20250625154813.27254-1-alexandru.elisei@arm.com/
Mathias Krause (2):
scripts: Fix typo for multi-line params match
scripts: Fix params regex match
scripts/common.bash | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.47.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [kvm-unit-tests PATCH 1/2] scripts: Fix typo for multi-line params match
2025-07-11 9:14 [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes Mathias Krause
@ 2025-07-11 9:14 ` Mathias Krause
2025-07-11 9:14 ` [kvm-unit-tests PATCH 2/2] scripts: Fix params regex match Mathias Krause
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mathias Krause @ 2025-07-11 9:14 UTC (permalink / raw)
To: Andrew Jones; +Cc: Alexandru Elisei, kvm, Mathias Krause
The call to 'vmm_default_opts' for a multi-line parameter contains a
typo, leading to an undefined function to be called.
Fix that.
Fixes: 6eb072c22598 ("scripts: Add default arguments for kvmtool")
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
---
scripts/common.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/common.bash b/scripts/common.bash
index 283fb30f5533..315c41537f64 100644
--- a/scripts/common.bash
+++ b/scripts/common.bash
@@ -53,7 +53,7 @@ function for_each_unittest()
elif [[ $line =~ ^test_args\ *=\ *(.*)$ ]]; then
test_args="$(vmm_optname_args) ${BASH_REMATCH[1]}"
elif [[ $line =~ ^$params_name\ *=\ *'"""'(.*)$ ]]; then
- opts="$(vmm_defaults_opts) ${BASH_REMATCH[1]}$'\n'"
+ opts="$(vmm_default_opts) ${BASH_REMATCH[1]}$'\n'"
while read -r -u $fd; do
#escape backslash newline, but not double backslash
if [[ $opts =~ [^\\]*(\\*)$'\n'$ ]]; then
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [kvm-unit-tests PATCH 2/2] scripts: Fix params regex match
2025-07-11 9:14 [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes Mathias Krause
2025-07-11 9:14 ` [kvm-unit-tests PATCH 1/2] scripts: Fix typo for multi-line params match Mathias Krause
@ 2025-07-11 9:14 ` Mathias Krause
2025-07-11 14:53 ` [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes Andrew Jones
2025-07-28 12:52 ` Alexandru Elisei
3 siblings, 0 replies; 5+ messages in thread
From: Mathias Krause @ 2025-07-11 9:14 UTC (permalink / raw)
To: Andrew Jones; +Cc: Alexandru Elisei, kvm, Mathias Krause
Commit bd93a9c61513 ("scripts: Add 'kvmtool_params' to test definition")
moved the "(extra_params|qemu_params)" regex sub-string to a helper
function vmm_unittest_params_name() but dropped the brackets, leading to
unintended matches if a line starts with "extra_params", wrongly making
it match a multi-line parameter expression.
Fix that by reintroducing the brackets.
Fixes: bd93a9c61513 ("scripts: Add 'kvmtool_params' to test definition")
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
---
scripts/common.bash | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/common.bash b/scripts/common.bash
index 315c41537f64..41310701f231 100644
--- a/scripts/common.bash
+++ b/scripts/common.bash
@@ -52,8 +52,8 @@ function for_each_unittest()
smp="$(vmm_optname_nr_cpus) ${BASH_REMATCH[1]}"
elif [[ $line =~ ^test_args\ *=\ *(.*)$ ]]; then
test_args="$(vmm_optname_args) ${BASH_REMATCH[1]}"
- elif [[ $line =~ ^$params_name\ *=\ *'"""'(.*)$ ]]; then
- opts="$(vmm_default_opts) ${BASH_REMATCH[1]}$'\n'"
+ elif [[ $line =~ ^($params_name)\ *=\ *'"""'(.*)$ ]]; then
+ opts="$(vmm_default_opts) ${BASH_REMATCH[2]}$'\n'"
while read -r -u $fd; do
#escape backslash newline, but not double backslash
if [[ $opts =~ [^\\]*(\\*)$'\n'$ ]]; then
@@ -68,8 +68,8 @@ function for_each_unittest()
opts+=$REPLY$'\n'
fi
done
- elif [[ $line =~ ^$params_name\ *=\ *(.*)$ ]]; then
- opts="$(vmm_default_opts) ${BASH_REMATCH[1]}"
+ elif [[ $line =~ ^($params_name)\ *=\ *(.*)$ ]]; then
+ opts="$(vmm_default_opts) ${BASH_REMATCH[2]}"
elif [[ $line =~ ^groups\ *=\ *(.*)$ ]]; then
groups=${BASH_REMATCH[1]}
elif [[ $line =~ ^arch\ *=\ *(.*)$ ]]; then
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes
2025-07-11 9:14 [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes Mathias Krause
2025-07-11 9:14 ` [kvm-unit-tests PATCH 1/2] scripts: Fix typo for multi-line params match Mathias Krause
2025-07-11 9:14 ` [kvm-unit-tests PATCH 2/2] scripts: Fix params regex match Mathias Krause
@ 2025-07-11 14:53 ` Andrew Jones
2025-07-28 12:52 ` Alexandru Elisei
3 siblings, 0 replies; 5+ messages in thread
From: Andrew Jones @ 2025-07-11 14:53 UTC (permalink / raw)
To: Mathias Krause; +Cc: Alexandru Elisei, kvm
On Fri, Jul 11, 2025 at 11:14:36AM +0200, Mathias Krause wrote:
> Hi,
>
> these two patches fix issues with the kvmtool support series[1] recently
> merged.
>
> Please apply!
>
> [1] https://lore.kernel.org/kvm/20250625154813.27254-1-alexandru.elisei@arm.com/
>
> Mathias Krause (2):
> scripts: Fix typo for multi-line params match
> scripts: Fix params regex match
>
> scripts/common.bash | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Merged.
Thanks,
drew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes
2025-07-11 9:14 [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes Mathias Krause
` (2 preceding siblings ...)
2025-07-11 14:53 ` [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes Andrew Jones
@ 2025-07-28 12:52 ` Alexandru Elisei
3 siblings, 0 replies; 5+ messages in thread
From: Alexandru Elisei @ 2025-07-28 12:52 UTC (permalink / raw)
To: Mathias Krause; +Cc: Andrew Jones, kvm
Hi Mathias,
Was on holiday, and couldn't reply earlier. Just wanted to say thank you for the
fixes!
Alex
On Fri, Jul 11, 2025 at 11:14:36AM +0200, Mathias Krause wrote:
> Hi,
>
> these two patches fix issues with the kvmtool support series[1] recently
> merged.
>
> Please apply!
>
> [1] https://lore.kernel.org/kvm/20250625154813.27254-1-alexandru.elisei@arm.com/
>
> Mathias Krause (2):
> scripts: Fix typo for multi-line params match
> scripts: Fix params regex match
>
> scripts/common.bash | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> --
> 2.47.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-28 12:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 9:14 [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes Mathias Krause
2025-07-11 9:14 ` [kvm-unit-tests PATCH 1/2] scripts: Fix typo for multi-line params match Mathias Krause
2025-07-11 9:14 ` [kvm-unit-tests PATCH 2/2] scripts: Fix params regex match Mathias Krause
2025-07-11 14:53 ` [kvm-unit-tests PATCH 0/2] Fixes for recent kvmtool support changes Andrew Jones
2025-07-28 12:52 ` Alexandru Elisei
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).