Correct flaws in arc_summary[23] and their test.

The change correctly handles BrokenPipeError and improves the
associated tests.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12037
Closes #12036
This commit is contained in:
Rich Ercolani
2021-05-25 22:02:01 -04:00
committed by Brian Behlendorf
parent aa4a84e616
commit ecebf770c1
3 changed files with 73 additions and 51 deletions
@@ -48,6 +48,9 @@ else
set -A args "" "-a" "-d" "-p 1"
fi
# Without this, the below checks aren't going to work the way we hope...
set -o pipefail
typeset -i i=0
while [[ $i -lt ${#args[*]} ]]; do
log_must eval "arc_summary ${args[i]} > /dev/null"