diff options
author | David Teigland <teigland@redhat.com> | 2016-04-21 15:53:15 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2016-04-27 15:45:39 -0500 |
commit | 2e1bffc0523246ae525f64bca1685587b29b7bf9 (patch) | |
tree | fc8eec9562ffa71ded59d4c03aff2e253c02d12c | |
parent | 87e9184cb8639fe6dc761eda873434bda56e7944 (diff) | |
download | lvm2-2e1bffc0523246ae525f64bca1685587b29b7bf9.tar.gz |
test: pv-duplicate-uuid
update for duplicate changes
-rw-r--r-- | test/shell/pv-duplicate-uuid.sh | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/test/shell/pv-duplicate-uuid.sh b/test/shell/pv-duplicate-uuid.sh index bd54f5f4e..a135f1ba1 100644 --- a/test/shell/pv-duplicate-uuid.sh +++ b/test/shell/pv-duplicate-uuid.sh @@ -19,13 +19,37 @@ aux prepare_devs 3 pvcreate "$dev1" UUID1=$(get pv_field "$dev1" uuid) -pvcreate --config "devices{filter=[\"a|$dev2|\",\"r|.*|\"]}" -u "$UUID1" --norestorefile "$dev2" -pvcreate --config "devices{filter=[\"a|$dev3|\",\"r|.*|\"]}" -u "$UUID1" --norestorefile "$dev3" +pvcreate --config "devices{filter=[\"a|$dev2|\",\"r|.*|\"]} global/use_lvmetad=0" -u "$UUID1" --norestorefile "$dev2" +pvcreate --config "devices{filter=[\"a|$dev3|\",\"r|.*|\"]} global/use_lvmetad=0" -u "$UUID1" --norestorefile "$dev3" + +pvscan --cache 2>&1 | tee out + +if test -e LOCAL_LVMETAD; then + grep "was already found" out + grep "WARNING: Disabling lvmetad cache which does not support duplicate PVs." out +fi pvs -o+uuid 2>&1 | tee out -COUNT=$(should grep --count "Found duplicate" out) -# FIXME lvmetad is not able to serve properly this case -should [ "$COUNT" -eq 2 ] +grep WARNING out > warn || true +grep -v WARNING out > main || true + +grep "$dev1" main +grep "$dev2" main +grep "$dev3" main + +COUNT=$(grep --count "was already found" warn) +[ "$COUNT" -eq 2 ] + +pvs -o+uuid --config "devices{filter=[\"a|$dev2|\",\"r|.*|\"]}" 2>&1 | tee out + +rm warn main || true +grep WARNING out > warn || true +grep -v WARNING out > main || true + +not grep "$dev1" main +grep "$dev2" main +not grep "$dev3" main + +not grep "was already found" warn -pvs -o+uuid --config "devices{filter=[\"a|$dev2|\",\"r|.*|\"]}" |