summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2014-03-10 14:15:40 -0500
committerDavid Teigland <teigland@redhat.com>2014-03-10 14:15:40 -0500
commit93513413c0efcba21689653f430922827cd6a69e (patch)
tree93a124360718cb671e38bb3bd0a2dfb5764103d7
parentd094861a4e2364ab6267c36ceb3a6b97a7b4eda0 (diff)
downloadlvm2-dev-dct-process-v7.tar.gz
test: add process-each-vguuiddev-dct-process-v7
-rw-r--r--test/shell/process-each-vguuid.sh75
1 files changed, 75 insertions, 0 deletions
diff --git a/test/shell/process-each-vguuid.sh b/test/shell/process-each-vguuid.sh
new file mode 100644
index 000000000..93ece904d
--- /dev/null
+++ b/test/shell/process-each-vguuid.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+# Copyright (C) 2008-2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+
+test_description='Test vg uuids as command args to process_each_vg commands'
+
+. lib/test
+
+aux prepare_devs 3
+
+pvcreate $dev1
+pvcreate $dev2
+pvcreate $dev3
+
+vgcreate $vg1 $dev1
+UUID1=$(vgs --noheading -o vg_uuid $vg1)
+
+vgcreate $vg2 $dev2
+UUID2=$(vgs --noheading -o vg_uuid $vg2)
+
+vgcreate $vg3 $dev3
+UUID3=$(vgs --noheading -o vg_uuid $vg3)
+
+vgs -o+vg_uuid >err
+cat err
+grep $vg1 err
+grep $vg2 err
+grep $vg3 err
+grep $UUID1 err
+grep $UUID2 err
+grep $UUID3 err
+
+vgs -o+vg_uuid $vg1 >err
+grep $vg1 err
+grep $UUID1 err
+not grep $vg2 err
+not grep $UUID2 err
+not grep $vg3 err
+not grep $UUID3 err
+
+vgs -o+vg_uuid $UUID1 >err
+grep $vg1 err
+grep $UUID1 err
+not grep $vg2 err
+not grep $UUID2 err
+not grep $vg3 err
+not grep $UUID3 err
+
+vgs -o+vg_uuid $vg2 >err
+grep $vg2 err
+grep $UUID2 err
+not grep $vg1 err
+not grep $UUID1 err
+not grep $vg3 err
+not grep $UUID3 err
+
+vgs -o+vg_uuid $UUID2 >err
+grep $vg2 err
+grep $UUID2 err
+not grep $vg1 err
+not grep $UUID1 err
+not grep $vg3 err
+not grep $UUID3 err
+
+vgs -o+vg_uuid $UUID1 $UUID2 >err
+grep $vg1 err
+grep $vg2 err
+grep $UUID1 err
+grep $UUID2 err
+not grep $vg3 err
+not grep $UUID3 err
+