Test suite: don't use fragile shell construct mixing string and array

The previous code happened to work only because we always pass either 0 or 1
arguments to these functions. If we ever passed them 2+ arguments,
unexpected things would happen.

For details, see https://www.shellcheck.net/wiki/SC2145
This commit is contained in:
intrigeri 2022-02-13 07:30:42 +00:00
parent fb94661937
commit 14d35c651c
4 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@ ${__dbus_var_decl}
$test {
@{gen $test}
unix,
$@
$*
signal receive peer=unconfined,
}
EOF

View file

@ -33,7 +33,7 @@ confined_args="--log=$confined_log $listnames"
message_gendbusprofile()
{
gendbusprofile "${confined_log} w,
$@"
$*"
}
start_bus

View file

@ -62,7 +62,7 @@ service_runchecktest()
service_gendbusprofile()
{
gendbusprofile "$unconfined_log w,
$@"
$*"
}
start_bus

View file

@ -63,7 +63,7 @@ ur_gendbusprofile()
{
gendbusprofile "$confined_log w,
dbus bind bus=$bus name=$dest,
$@"
$*"
}
start_bus