master - tests: pvscan --cache DevicePath does not fail if the device is just filtered
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8804023825e9eb00df653a7c5116097d1ce49087 Commit: 8804023825e9eb00df653a7c5116097d1ce49087 Parent: 99d895014d971395fe7a739838952e7405eb4dda Author: Peter Rajnoha <[email protected]> AuthorDate: Mon Jan 12 15:16:57 2015 +0100 Committer: Peter Rajnoha <[email protected]> CommitterDate: Mon Jan 12 15:16:57 2015 +0100
tests: pvscan --cache DevicePath does not fail if the device is just filtered
It's not an error if the device is filtered out and hence cleared from lvmetad cache - "pvscan --cache DevPath" has now the same behaviour in this case as "pvscan --cache major:minor" (which is more consistent).
Before, the tests expected failure return code for "pvscan --cache DevicePath" if the device was filtered (which is a different situation if the device is missing in the system completely!).
--- test/shell/lvmetad-pvscan-filter.sh | 4 +++- test/shell/lvmetad-pvscan-md.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-)
test/shell/lvmetad-pvscan-filter.sh +3 -1
@@ -18,8 +18,10 @@ aux prepare_pvs 2 maj=$(($(stat -L --printf=0x%t "$dev2"))) min=$(($(stat -L --printf=0x%T "$dev2"))) +# Filter out device, pvscan should trigger +# clearing of the device from lvmetad cache. aux hide_dev "$dev2" -not pvscan --cache "$dev2" 2>&1 | grep "not found" +pvscan --cache "$dev2" 2>&1 | grep "not found" # pvscan with --major/--minor does not fail: lvmetad needs to # be notified about device removal on REMOVE uevent, hence # this should not fail so udev does not grab a "failed" state
test/shell/lvmetad-pvscan-md.sh +2 -2
@@ -69,8 +69,8 @@ pvcreate $lvmdev pvscan --cache "$lvmdev" # ensure that lvmetad can only see the toplevel MD device -not pvscan --cache "$dev1" 2>&1 | grep "not found" -not pvscan --cache "$dev2" 2>&1 | grep "not found" +pvscan --cache "$dev1" 2>&1 | grep "not found" +pvscan --cache "$dev2" 2>&1 | grep "not found" pvs | grep $lvmdev pvs | not grep "$dev1"