]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
livepatch/selftests: use "$@" to preserve argument list
authorJoe Lawrence <joe.lawrence@redhat.com>
Fri, 8 Feb 2019 20:57:37 +0000 (15:57 -0500)
committerPetr Mladek <pmladek@suse.com>
Tue, 12 Feb 2019 09:58:47 +0000 (10:58 +0100)
commitfbb76d579dff4a2e332566dcd1d5979ac92bc34b
tree70a6a8efcec81458ff50b1774469805af3d8db54
parenta087cdd4073b78f4739ce6709daeb4f3267b4dbf
livepatch/selftests: use "$@" to preserve argument list

The livepatch selftest functions.sh library uses "$*" and an
intermediate variable to extract and then pass arguments from function
to function call.  The effect of this combination is that the argument
list is flattened into a single argument.  Sometimes this is benign, but
in cases like __load_mod(), the modprobe invocation will interpret all
the module parameters as a single parameter.

Drop the intermediate variable and use the "$@" special parameter as
described in the bash manual.

Link: https://www.gnu.org/software/bash/manual/bash.html#Special-Parameters
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Petr Mladek <pmladek@suse.com>
tools/testing/selftests/livepatch/functions.sh