Re: [PATCH v2 3/3] nvme: add test for controller rescan under I/O load
From: Shinichiro Kawasaki <hidden>
Date: 2024-09-03 00:16:23
Also in:
linux-nvme
From: Shinichiro Kawasaki <hidden>
Date: 2024-09-03 00:16:23
Also in:
linux-nvme
On Sep 02, 2024 / 15:53, Martin Wilck wrote:
On Thu, 2024-08-29 at 07:36 +0000, Shinichiro Kawasaki wrote:quoted
Shellcheck reports a warning here: tests/nvme/053:47:9: warning: Prefer mapfile or read -a to split command output (or quote to avoid splitting). [SC2207] It is a bit lengthy, but let's replace the line above with this: while read -r line ; do ctrls+=("$line"); done < <(_nvme_get_ctrl_list)Thanks for the review. If you don't mind, I'll just use "mapfile -t", as suggested by shellcheck.
The reason I did not suggest the "mapfile -t" solution was that SC2207 recommends it for bash versions 4.4+ [1]. On the other hand, blktests README.md requires bash version >= 4.2. So I assume that some blktests users use bash version 4.2 or 4.3. I took a glance in the bash change history [2], and there are some mpafile related bug fixes between bash version v4.2 an v4.4. So I think it's the better to not use "mpafile -t" in blktests. Do you have any specific reason to use "mapfile -t"? [1] https://www.shellcheck.net/wiki/SC2207 [2] https://git.savannah.gnu.org/cgit/bash.git/tree/CHANGES
Martin