diff options
-rw-r--r-- | test/shell/lvmetad-pvscan-filter.sh | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/test/shell/lvmetad-pvscan-filter.sh b/test/shell/lvmetad-pvscan-filter.sh index 91bb93011..df157c3b5 100644 --- a/test/shell/lvmetad-pvscan-filter.sh +++ b/test/shell/lvmetad-pvscan-filter.sh @@ -22,17 +22,33 @@ 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" +pvscan --cache "$dev2" 2>&1 | tee out +cat out +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" + +pvscan --cache --major $maj --minor $min 2>&1 | tee out +cat out +grep "not found" out 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" -pvs | grep "$dev2" +pvscan --cache "$dev2" 2>&1 | tee out +cat out +not grep "not found" out + +pvscan --cache --major $maj --minor $min 2>&1 | tee out +cat out +not grep "not found" out + +pvs | tee out +cat out +grep "$dev2" out + |