diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2015-09-17 10:19:15 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2015-09-17 10:19:15 +0200 |
commit | b5022102bbaf978cddd7ca9b27a1a12d5aeef44d (patch) | |
tree | a49863fd238c4fd1d4868419cd189682d2a54bba /test/shell | |
parent | b7410c95cfbf53b2197611a0950450f7251643fc (diff) | |
download | lvm2-b5022102bbaf978cddd7ca9b27a1a12d5aeef44d.tar.gz |
libdm: report: make it possible to use blank value as selection for string list report field
$ lvs -o name,tags vg
LV LV Tags
lvol0
lvol1 mytag
Before this patch:
$ lvs -o name,tags vg -S 'tags=""'
Failed to parse string list value for selection field lv_tags.
Selection syntax error at 'tags=""'.
Use 'help' for selection to get more help.
(and the same for -S 'tags={}' and -S 'tags=[]')
With this patch applied:
$ lvs -o name,tags vg -S 'tags=""'
LV LV Tags
lvol0
(and the same for -S 'tags={}' and -S 'tags=[]')
Diffstat (limited to 'test/shell')
-rw-r--r-- | test/shell/select-report.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/shell/select-report.sh b/test/shell/select-report.sh index fde7dc04c..b85919920 100644 --- a/test/shell/select-report.sh +++ b/test/shell/select-report.sh @@ -106,6 +106,10 @@ sel pv 'tags=["pv_tag4" || "pv_tag3"]' "$dev1" "$dev6" sel pv 'tags!=["pv_tag1"]' "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6" # check mixture of && and || - this is not allowed not sel pv 'tags=["pv_tag1" && "pv_tag2" || "pv_tag3"]' +# check selection with blank value +sel lv 'tags=""' xyz orig snap +sel lv 'tags={}' xyz orig snap +sel lv 'tags=[]' xyz orig snap ########################## # NUMBER FIELD SELECTION # |