test: correctly process multiline strings in $KERNEL_APPEND
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 19 Aug 2022 14:30:24 +0000 (16:30 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 19 Aug 2022 21:31:32 +0000 (22:31 +0100)
commitbea9d62bdb499b7b2a49a478cac51d46416808d4
tree54ad002be070c5c35aa691b8150c11ce5b64853b
parentc06b6d46fd80261c694b64fc6b187520d3e92b74
test: correctly process multiline strings in $KERNEL_APPEND

Some tests (like TEST-02) set a multiline string to $KERNEL_APPEND
(which is a valid thing to do), unfortunately we'd use only the first
line of it and throw the rest away, e.g:

```
$ printf "%s" "$x"
hello

this is a multiline

kernel command line
$ read -ra out <<< "$x"
$ printf "%s" "${out[@]}"
hello
```

Let's use readarray/mapfile instead to avoid this:

```
$ readarray out <<< "$x"
$ printf "%s" "${out[@]}"
hello

this is a multiline

kernel command line

```
test/test-functions