aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2017-12-19 13:19:24 -0800
committerBrian Behlendorf <[email protected]>2017-12-19 13:19:24 -0800
commit89a66a0457cd392ab8c6ad6d9c138fedaa425067 (patch)
tree98e8780818ed2e25a5009941235a9eaf367d355c /tests
parentc4ba46deade0a14d089228a56a5d0aa0ffd5fadd (diff)
Handle broken pipes in arc_summary
Using a command similar to 'arc_summary.py | head' causes a broken pipe exception. Gracefully exit in the case of a broken pipe in arc_summary.py. Reviewed-by: Richard Elling <[email protected]> Reviewed-by: loli10K <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #6965 Closes #6969
Diffstat (limited to 'tests')
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_user/misc/arc_summary_001_pos.ksh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_user/misc/arc_summary_001_pos.ksh b/tests/zfs-tests/tests/functional/cli_user/misc/arc_summary_001_pos.ksh
index 67c11c8ab..6653b9c1a 100755
--- a/tests/zfs-tests/tests/functional/cli_user/misc/arc_summary_001_pos.ksh
+++ b/tests/zfs-tests/tests/functional/cli_user/misc/arc_summary_001_pos.ksh
@@ -37,4 +37,7 @@ while [[ $i -lt ${#args[*]} ]]; do
((i = i + 1))
done
+log_must eval "arc_summary.py | head > /dev/null"
+log_must eval "arc_summary.py | head -1 > /dev/null"
+
log_pass "arc_summary.py generates output and doesn't return an error code"