All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] test: add process-each-duplicate-vgnames
Date: Wed, 21 Aug 2013 18:55:42 -0400	[thread overview]
Message-ID: <20130821225542.GA23463@redhat.com> (raw)

Test that vgs shows both vgs when two vgs
exist with the same name but different uuids.
---
 test/shell/process-each-duplicate-vgnames.sh | 52 ++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 test/shell/process-each-duplicate-vgnames.sh

diff --git a/test/shell/process-each-duplicate-vgnames.sh b/test/shell/process-each-duplicate-vgnames.sh
new file mode 100644
index 0000000..8be8168
--- /dev/null
+++ b/test/shell/process-each-duplicate-vgnames.sh
@@ -0,0 +1,52 @@
+#!/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 vgs with duplicate vg names'
+
+. lib/test
+
+aux prepare_devs 2
+
+pvcreate $dev1
+pvcreate $dev2
+
+aux disable_dev $dev1
+aux disable_dev $dev2
+
+aux enable_dev $dev1
+vgcreate $vg1 $dev1
+UUID1=$(vgs --noheading -o vg_uuid $vg1)
+aux disable_dev $dev1
+
+aux enable_dev $dev2
+vgcreate $vg1 $dev2
+UUID2=$(vgs --noheading -o vg_uuid $vg1)
+aux disable_dev $dev2
+
+aux enable_dev $dev1
+aux enable_dev $dev2
+
+vgs >err
+grep $UUID1 err
+grep $UUID2 err
+
+# should we specify and test which should be displayed?
+# vgs --noheading -o vg_uuid $vg1 >err
+# grep $UUID1 err
+
+aux disable_dev $dev2
+vgs >err
+grep $UUID1 err
+not grep $UUID2 err
+aux enable_dev $dev2
+
+aux disable_dev $dev1
+vgs >err
+grep $UUID2 err
+not grep $UUID1 err
+aux enable_dev $dev1
+
-- 
1.8.3.1



                 reply	other threads:[~2013-08-21 22:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130821225542.GA23463@redhat.com \
    --to=teigland@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.