[kvm-unit-tests RFC PATCH 17/17] shellcheck: Suppress various messages
Andrew Jones
andrew.jones at linux.dev
Sat Apr 6 00:30:02 PDT 2024
On Sat, Apr 06, 2024 at 04:31:17PM +1000, Nicholas Piggin wrote:
...
> > > diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> > > index 3b76aec9e..c87613b96 100644
> > > --- a/scripts/runtime.bash
> > > +++ b/scripts/runtime.bash
> > > @@ -137,6 +137,8 @@ function run()
> > > # the check line can contain multiple files to check separated by a space
> > > # but each check parameter needs to be of the form <path>=<value>
> > > if [ "$check" ]; then
> > > + # There is no globbing allowed in the check parameter.
> > > + # shellcheck disable=SC2206
> > > check=($check)
> >
> > Hmm, I'm not sure about this one. $check is an arbitrary path, which means
> > it can have spaces, then =, and then an arbitrary value, which means it can
> > contain spaces. If there are multiple check path=value pairs then
> > separation by space is a bad idea, and any deliminator really is. It seems
> > like each pair should be quoted, i.e.
> >
> > check = "path1=value1" "path2=value2"
> >
> > and then that should be managed here.
>
> Yeah I did think of that, valid paths could also have = and ", and even
> with double quotes it seems to be tricky to handle spaces.
>
> Maybe I'll just add to the unittest.cfg docs to stick with alphanumeric
> paths, and we can improve it if someone complains?
Works for me.
Thanks,
drew
More information about the kvm-riscv
mailing list