diff options
author | David Teigland <teigland@redhat.com> | 2016-05-05 15:16:38 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2016-05-23 11:03:09 -0500 |
commit | caaed7c58d65aab8d327d28f76d025c5cd0a96dc (patch) | |
tree | e2e68c1a6ae7b99b16edb66b0ade2ceaeed7bff8 | |
parent | 61e8e7853299b87282ced5c97193d78872a7884e (diff) | |
download | lvm2-caaed7c58d65aab8d327d28f76d025c5cd0a96dc.tar.gz |
test: lvmetad-pvscan-filter
update for pvscan changes
-rw-r--r-- | test/shell/lvmetad-pvscan-filter.sh | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/test/shell/lvmetad-pvscan-filter.sh b/test/shell/lvmetad-pvscan-filter.sh index 91bb93011..cb3fcdc99 100644 --- a/test/shell/lvmetad-pvscan-filter.sh +++ b/test/shell/lvmetad-pvscan-filter.sh @@ -22,17 +22,35 @@ min=$(($(stat -L --printf=0x%T "$dev2"))) # Filter out device, pvscan should trigger # clearing of the device from lvmetad cache. -aux hide_dev "$dev2" -pvscan --cache "$dev2" 2>&1 | grep "not found" + +# We can't use aux hide_dev here because that +# changes the global_filter which triggers a +# token mismatch rescan by subsequent pvscan +# commands instead of the single-dev scans +# that are testing here. + +mv "$dev2" "$dev2-HIDDEN" + +pvscan --cache "$dev2" 2>&1 | tee out || true +grep "not found" out + # 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 # incorrectly. We notify device addition and removal with # exactly the same command "pvscan --cache" - in case of removal, # this is detected by nonexistence of the device itself. -pvscan --cache --major $maj --minor $min 2>&1 | grep "not found" -aux unhide_dev "$dev2" -pvscan --cache "$dev2" 2>&1 | not grep "not found" -pvscan --cache --major $maj --minor $min 2>&1 | not grep "not found" +pvscan --cache --major $maj --minor $min 2>&1 | tee out || true +grep "not found" out + +# aux unhide_dev "$dev2" +mv "$dev2-HIDDEN" "$dev2" + +pvscan --cache "$dev2" 2>&1 | tee out || true +not grep "not found" out + +pvscan --cache --major $maj --minor $min 2>&1 | tee out || true +not grep "not found" out + pvs | grep "$dev2" |