diff options
author | Giuseppe Di Natale <[email protected]> | 2017-12-19 13:19:24 -0800 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2018-01-30 10:27:31 -0600 |
commit | c2aacf20872856559972a27f7c3f9b4a6fe10cd2 (patch) | |
tree | 1c7b4a894504bd001941663c93ca7e8afaa8d63e /tests | |
parent | 9a6c57845a431f55fd617c38e180b26215f0ca6f (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-x | tests/zfs-tests/tests/functional/cli_user/misc/arc_summary_001_pos.ksh | 3 |
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" |