mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-27 01:57:55 +03:00
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!).
This commit is contained in:
parent
99d895014d
commit
8804023825
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user