Handle invalid options in arc_summary

If an invalid option is provided to arc_summary.py we handle any error
thrown from the getopt Python module and print the usage help message.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6983
This commit is contained in:
LOLi
2017-12-19 22:02:40 +01:00
committed by Tony Hutter
parent d27a40d28f
commit 9a6c57845a
4 changed files with 51 additions and 6 deletions
+1 -1
View File
@@ -366,7 +366,7 @@ tests = ['zdb_001_neg', 'zfs_001_neg', 'zfs_allow_001_neg',
'zpool_offline_001_neg', 'zpool_online_001_neg', 'zpool_remove_001_neg',
'zpool_replace_001_neg', 'zpool_scrub_001_neg', 'zpool_set_001_neg',
'zpool_status_001_neg', 'zpool_upgrade_001_neg', 'arcstat_001_pos',
'arc_summary_001_pos', 'dbufstat_001_pos']
'arc_summary_001_pos', 'arc_summary_002_neg', 'dbufstat_001_pos']
user =
tags = ['functional', 'cli_user', 'misc']