master - config: fix compile error in config-settings.h if using --disable-dmeventd
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=68bb639a08330c...
Commit: 68bb639a08330c7f06558e51ecab48d6a4ca2854
Parent: 367e4551a1f1ef81f4ed3cc0200247a571af78e8
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Mar 31 15:57:30 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Mar 31 15:57:42 2014 +0200
config: fix compile error in config-settings.h if using --disable-dmeventd
config/config_settings.h:257:102: error: 'DMEVENTD_PATH' undeclared here (not in a function)
---
lib/config/config_settings.h | 2 +-
lib/config/defaults.h | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index dce77b9..932ba2e 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -254,7 +254,7 @@ cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_
cfg(dmeventd_raid_library_CFG, "raid_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_RAID_LIB, vsn(2, 2, 87), NULL)
cfg(dmeventd_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26), NULL)
cfg(dmeventd_thin_library_CFG, "thin_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_THIN_LIB, vsn(2, 2, 89), NULL)
-cfg(dmeventd_executable_CFG, "executable", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DMEVENTD_PATH, vsn(2, 2, 73), NULL)
+cfg(dmeventd_executable_CFG, "executable", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_PATH, vsn(2, 2, 73), NULL)
cfg(tags_hosttags_CFG, "hosttags", tags_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_HOSTTAGS, vsn(1, 0, 18), NULL)
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index 6820def..94b11c0 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -66,6 +66,12 @@
#define DEFAULT_DMEVENTD_MONITOR 1
#define DEFAULT_BACKGROUND_POLLING 1
+#ifndef DMEVENTD_PATH
+#define DEFAULT_DMEVENTD_PATH ""
+#else
+#define DEFAULT_DMEVENTD_PATH DMEVENTD_PATH
+#endif
+
#define DEFAULT_THIN_CHECK_OPTIONS "-q"
#define DEFAULT_THIN_REPAIR_OPTIONS ""
#define DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS 0
9 years, 6 months
master - tests: add more rename test
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=367e4551a1f1ef...
Commit: 367e4551a1f1ef81f4ed3cc0200247a571af78e8
Parent: ee8708cc8ebfcbb55800e6ca8782394b5f3db2f7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 31 11:44:55 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 31 12:05:35 2014 +0200
tests: add more rename test
Drop test, which are now in other files (listings.sh)
---
test/shell/covercmd.sh | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/test/shell/covercmd.sh b/test/shell/covercmd.sh
index d9a5382..a036d92 100644
--- a/test/shell/covercmd.sh
+++ b/test/shell/covercmd.sh
@@ -21,38 +21,31 @@ aux prepare_pvs 5
pvcreate --metadatacopies 0 "$dev2"
pvcreate --metadatacopies 0 "$dev3"
-pvscan --uuid
-
# FIXME takes very long time
#pvck "$dev1"
-
vgcreate $vg $(cat DEVICES)
-not vgscan $vg
-vgscan --mknodes
-vgs -o all $vg
lvcreate -l 5 -i5 -I256 -n $lv $vg
lvcreate -aey -l 5 -n $lv1 $vg
lvcreate -s -l 5 -n $lv2 $vg/$lv1
pvck "$dev1"
-not lvscan $vg
-lvscan
-
-lvmdiskscan
-
# "-persistent y --major 254 --minor 20"
# "-persistent n"
-for i in pr "p rw" an ay "-monitor y" "-monitor n" \
- -refresh "-addtag MYTAG" "-deltag MYETAG"; do
+for i in pr "p rw" "-monitor y" "-monitor n" -refresh; do
lvchange -$i $vg/$lv
done
lvrename $vg $lv $lv-rename
-not lvrename $vg
-not lvrename $vg-xxx
-not lvrename $vg $vg/$lv-rename $vg1/$lv
+invalid lvrename $vg
+invalid lvrename $vg $vg/$lv-rename $vg1/$lv
+invalid lvrename $vg/$lv-rename $vg1/$lv $vg
+invalid lvrename $vg/$lv-rename $vg/012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
+invalid lvrename $vg/$lv-rename $vg/""
+invalid lvrename $vg/$lv-rename "$vg/!@#$%"
+invalid lvrename $vg/$lv-rename $vg/$lv-rename
+fail lvrename $vg1/$lv-rename $vg1/$lv
vgremove -f $vg
9 years, 6 months
master - tests: more listing tests
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ee8708cc8ebfcb...
Commit: ee8708cc8ebfcbb55800e6ca8782394b5f3db2f7
Parent: f93c9b447b52058526ca8aadedcd3aed78f8f0fe
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 31 11:44:39 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 31 12:05:35 2014 +0200
tests: more listing tests
---
test/shell/listings.sh | 49 ++++++++++++++++++++++++++++++++++++-----------
1 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/test/shell/listings.sh b/test/shell/listings.sh
index 414b146..d46ee7f 100644
--- a/test/shell/listings.sh
+++ b/test/shell/listings.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2008-2014 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
@@ -17,6 +17,10 @@
aux prepare_devs 5
+# Check there is no PV
+pvscan | tee out
+grep "No matching" out
+
pvcreate --uuid BADBEE-BAAD-BAAD-BAAD-BAAD-BAAD-BADBEE --norestorefile "$dev1"
pvcreate --metadatacopies 0 "$dev2"
pvcreate --metadatacopies 0 "$dev3"
@@ -65,6 +69,7 @@ dmsetup ls|grep "$PREFIX"|grep -v "LVMTEST.*pv."
#COMM vgs with options from pvs still treats arguments as VGs (bz193543)
vgs -o pv_name,vg_name $vg
# would complain if not
+vgs -o all $vg
#COMM pvdisplay --maps feature (bz149814)
pvdisplay $(cat DEVICES) >out
@@ -75,39 +80,52 @@ aux disable_dev "$dev1"
pvs -o +pv_uuid | grep BADBEE-BAAD-BAAD-BAAD-BAAD-BAAD-BADBEE
aux enable_dev "$dev1"
+pvscan --uuid
+pvscan -e
+pvscan -s
+pvscan --novolumegroup
+vgscan --mknodes
+lvscan
+lvmdiskscan
+
+invalid pvscan "$dev1"
+invalid pvscan -aay
+invalid pvscan --major 254
+invalid pvscan --minor 0
+invalid pvscan --novolumegroup -e
+invalid vgscan $vg
+invalid lvscan $vg
+
if aux have_readline; then
-# test *scan and *display tools
cat <<EOF | lvm
-vgdisplay --units k $vg
-lvdisplay --units g $vg
pvdisplay -c "$dev1"
pvdisplay -s "$dev1"
+vgdisplay --units k $vg
vgdisplay -c $vg
vgdisplay -C $vg
vgdisplay -s $vg
+vgdisplay -v $vg
lvdisplay -c $vg
lvdisplay -C $vg
lvdisplay -m $vg
+lvdisplay --units g $vg
EOF
for i in h b s k m g t p e H B S K M G T P E; do
echo pvdisplay --units $i "$dev1"
done | lvm
else
-pvscan --uuid
-vgscan --mknodes
-lvscan
-lvmdiskscan
-vgdisplay --units k $vg
-lvdisplay --units g $vg
pvdisplay -c "$dev1"
pvdisplay -s "$dev1"
+vgdisplay --units k $vg
vgdisplay -c $vg
vgdisplay -C $vg
vgdisplay -s $vg
+vgdisplay -v $vg
lvdisplay -c $vg
lvdisplay -C $vg
lvdisplay -m $vg
+lvdisplay --units g $vg
for i in h b s k m g t p e H B S K M G T P E; do
pvdisplay --units $i "$dev1"
@@ -115,7 +133,7 @@ done
fi
invalid lvdisplay -C -m $vg
-invalid lvdisplay -c -v $vg
+invalid lvdisplay -c -m $vg
invalid lvdisplay --aligned $vg
invalid lvdisplay --noheadings $vg
invalid lvdisplay --options lv_name $vg
@@ -127,6 +145,12 @@ invalid vgdisplay -C -A
invalid vgdisplay -C -c
invalid vgdisplay -C -s
invalid vgdisplay -c -s
+invalid vgdisplay --aligned
+invalid vgdisplay --noheadings
+invalid vgdisplay --options
+invalid vgdisplay --separator :
+invalid vgdisplay --sort size
+invalid vgdisplay --unbuffered
invalid vgdisplay -A $vg1
invalid pvdisplay -C -A
@@ -135,7 +159,7 @@ invalid pvdisplay -C -m
invalid pvdisplay -C -s
invalid pvdisplay -c -m
invalid pvdisplay -c -s
-invalid pvdisplay --alianed
+invalid pvdisplay --aligned
invalid pvdisplay --all
invalid pvdisplay --noheadings
invalid pvdisplay --options
@@ -147,6 +171,7 @@ invalid pvdisplay -A $vg1
# Check exported VG listing
vgchange -an $vg
vgexport -a
+pvscan
pvdisplay --noheadings -C -o attr,name | tee out
not grep -v "ax-" out
vgimport -a
9 years, 6 months
master - cleanup: skip eval of minor when major is true
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f93c9b447b5205...
Commit: f93c9b447b52058526ca8aadedcd3aed78f8f0fe
Parent: a33d4355a1e9a08012f348203c0bf673d778c18e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 31 11:43:28 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 31 12:05:34 2014 +0200
cleanup: skip eval of minor when major is true
Use normal '||'.
---
tools/pvscan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/pvscan.c b/tools/pvscan.c
index ae14878..dff2bb0 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -344,7 +344,7 @@ int pvscan(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
- if (arg_count(cmd, major_ARG) + arg_count(cmd, minor_ARG)) {
+ if (arg_count(cmd, major_ARG) || arg_count(cmd, minor_ARG)) {
log_error("--major and --minor are only valid with --cache.");
return EINVALID_CMD_LINE;
}
9 years, 6 months
master - cleanup: lvdisplay indent
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a33d4355a1e9a0...
Commit: a33d4355a1e9a08012f348203c0bf673d778c18e
Parent: 84beba5d7f13c235e14938b3ecfbcb16f938364a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 31 10:03:51 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 31 12:05:34 2014 +0200
cleanup: lvdisplay indent
---
tools/lvdisplay.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/tools/lvdisplay.c b/tools/lvdisplay.c
index 246e43b..1f40f09 100644
--- a/tools/lvdisplay.c
+++ b/tools/lvdisplay.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2014 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -40,12 +40,15 @@ int lvdisplay(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
return lvs(cmd, argc, argv);
- } else if (arg_count(cmd, aligned_ARG) ||
- arg_count(cmd, noheadings_ARG) ||
- arg_count(cmd, options_ARG) ||
- arg_count(cmd, separator_ARG) ||
- arg_count(cmd, sort_ARG) || arg_count(cmd, unbuffered_ARG)) {
- log_error("Incompatible options selected");
+ }
+
+ if (arg_count(cmd, aligned_ARG) ||
+ arg_count(cmd, noheadings_ARG) ||
+ arg_count(cmd, options_ARG) ||
+ arg_count(cmd, separator_ARG) ||
+ arg_count(cmd, sort_ARG) ||
+ arg_count(cmd, unbuffered_ARG)) {
+ log_error("Incompatible options selected.");
return EINVALID_CMD_LINE;
}
@@ -54,6 +57,5 @@ int lvdisplay(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
- return process_each_lv(cmd, argc, argv, 0, NULL,
- &_lvdisplay_single);
+ return process_each_lv(cmd, argc, argv, 0, NULL, &_lvdisplay_single);
}
9 years, 6 months
master - vg_validate: check size of lv_name + vg_name
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=84beba5d7f13c2...
Commit: 84beba5d7f13c235e14938b3ecfbcb16f938364a
Parent: 6570d36ad5dff3f2d9e4822cd8e2c0860d8a720a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 31 11:51:50 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 31 12:05:32 2014 +0200
vg_validate: check size of lv_name + vg_name
Since the whole dm device name may not exceed 127 characters,
validate no LV names is bigger then this limit.
---
WHATS_NEW | 1 +
lib/metadata/metadata.c | 11 +++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 34d567f..0a95f3d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Extend internal validation of lv names size is less then 128 chars.
Fail in resume for lvrename will result in failing command.
Validate length of new LV name in lvrename to not exceed 127 characters.
Add explict error message when using lvdisplay -c -m.
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 279043b..798f3ab 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -2336,6 +2336,8 @@ int vg_validate(struct volume_group *vg)
unsigned pv_count = 0;
unsigned num_snapshots = 0;
unsigned spare_count = 0;
+ size_t vg_name_len = strlen(vg->name);
+ size_t dev_name_len;
struct validate_hash vhash = { NULL };
if (vg->alloc == ALLOC_CLING_BY_TAGS) {
@@ -2417,6 +2419,15 @@ int vg_validate(struct volume_group *vg)
dm_list_iterate_items(lvl, &vg->lvs) {
lv_count++;
+ dev_name_len = strlen(lvl->lv->name) + vg_name_len + 3;
+ if (dev_name_len >= NAME_LEN) {
+ log_error(INTERNAL_ERROR "LV name \"%s/%s\" length %"
+ PRIsize_t " is not supported.",
+ vg->name, lvl->lv->name, dev_name_len);
+ r = 0;
+ }
+
+
if (lv_is_cow(lvl->lv))
num_snapshots++;
9 years, 6 months
master - lv_rename: resume fail is certainly error
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6570d36ad5dff3...
Commit: 6570d36ad5dff3f2d9e4822cd8e2c0860d8a720a
Parent: d3e4934a153a3113038d8458fb62781b234287ea
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 31 11:54:02 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 31 12:03:25 2014 +0200
lv_rename: resume fail is certainly error
Failing resume path means command has failed,
even when commit was ok.
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 1760a6b..34d567f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Fail in resume for lvrename will result in failing command.
Validate length of new LV name in lvrename to not exceed 127 characters.
Add explict error message when using lvdisplay -c -m.
Update man pages for pv/vg/lvdisplay.
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 7f042e3..bb812e2 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -3382,8 +3382,10 @@ int lv_rename_update(struct cmd_context *cmd, struct logical_volume *lv,
* (resume of snapshot resumes origin too)
*/
dm_list_iterate_back_items(lvlp, &lvs_changed)
- if (!resume_lv(cmd, lvlp->lv))
+ if (!resume_lv(cmd, lvlp->lv)) {
+ r = 0;
stack;
+ }
out:
backup(vg);
return r;
9 years, 6 months
master - lvrename: fix name length validation
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d3e4934a153a31...
Commit: d3e4934a153a3113038d8458fb62781b234287ea
Parent: caa429da2e58ad65ecfc8836f5f64c54395a8793
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 31 11:40:52 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 31 12:02:18 2014 +0200
lvrename: fix name length validation
This test for LV name restriction check name of device is below 128
chars (which is enforced by dm target).
Thus it should not count with device name.
(Though the test for PATH_MAX size should be probably also added,
but this is runtime test, since theoretically devpath might differ in cluster)
---
WHATS_NEW | 1 +
tools/lvrename.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index b5ee541..1760a6b 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Validate length of new LV name in lvrename to not exceed 127 characters.
Add explict error message when using lvdisplay -c -m.
Update man pages for pv/vg/lvdisplay.
Report error when running pvscan with free argument (i.e. PV name).
diff --git a/tools/lvrename.c b/tools/lvrename.c
index dd66ba4..0fea039 100644
--- a/tools/lvrename.c
+++ b/tools/lvrename.c
@@ -71,10 +71,10 @@ int lvrename(struct cmd_context *cmd, int argc, char **argv)
lv_name_new = st + 1;
/* Check sanity of new name */
- maxlen = NAME_LEN - strlen(vg_name) - strlen(cmd->dev_dir) - 3;
+ maxlen = NAME_LEN - strlen(vg_name) - 3;
if (strlen(lv_name_new) > maxlen) {
- log_error("New logical volume path exceeds maximum length "
- "of %" PRIsize_t "!", maxlen);
+ log_error("New logical volume name \"%s\" may not exceed %"
+ PRIsize_t " characters.", lv_name_new, maxlen);
return EINVALID_CMD_LINE;
}
9 years, 6 months
master - lvdiplay: prohibit use of -c and -m
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=caa429da2e58ad...
Commit: caa429da2e58ad65ecfc8836f5f64c54395a8793
Parent: 8f9150c241f80b2fd69d2e416340707759e79ac8
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 31 10:04:24 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 31 12:00:45 2014 +0200
lvdiplay: prohibit use of -c and -m
It's unclear why we should prohibit use of -v output.
So reenable (like with other 'display' tools)
But -c -m is really unsupported - return invalid cmd.
---
WHATS_NEW | 1 +
tools/lvdisplay.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 0decc72..b5ee541 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Add explict error message when using lvdisplay -c -m.
Update man pages for pv/vg/lvdisplay.
Report error when running pvscan with free argument (i.e. PV name).
Fix error message for pvdisplay -c -m and add new for pvdisplay -c -s.
diff --git a/tools/lvdisplay.c b/tools/lvdisplay.c
index f5531cb..246e43b 100644
--- a/tools/lvdisplay.c
+++ b/tools/lvdisplay.c
@@ -49,8 +49,8 @@ int lvdisplay(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
- if (arg_count(cmd, colon_ARG) && arg_count(cmd, verbose_ARG)) {
- log_error("Options -v and -c are incompatible");
+ if (arg_count(cmd, colon_ARG) && arg_count(cmd, maps_ARG)) {
+ log_error("Options -c and -m are incompatible.");
return EINVALID_CMD_LINE;
}
9 years, 6 months
master - tests: add more pvdisplay tests
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8f9150c241f80b...
Commit: 8f9150c241f80b2fd69d2e416340707759e79ac8
Parent: 1216aa7826428dfa5f83af4bd29c7741de7a1a23
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Mar 30 23:15:16 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Mar 30 23:45:00 2014 +0200
tests: add more pvdisplay tests
---
test/shell/listings.sh | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/test/shell/listings.sh b/test/shell/listings.sh
index 0d69957..414b146 100644
--- a/test/shell/listings.sh
+++ b/test/shell/listings.sh
@@ -25,6 +25,7 @@ pvcreate --metadatacopies 0 "$dev5"
#COMM bz195276 -- pvs doesn't show PVs until a VG is created
test $(pvs --noheadings $(cat DEVICES) | wc -l) -eq 5
+pvdisplay
#COMM pvs with segment attributes works even for orphans
test $(pvs --noheadings -o seg_all,pv_all,lv_all,vg_all $(cat DEVICES) | wc -l) -eq 5
@@ -122,13 +123,36 @@ invalid lvdisplay --separator : $vg
invalid lvdisplay --sort size $vg
invalid lvdisplay --unbuffered $vg
-
invalid vgdisplay -C -A
invalid vgdisplay -C -c
invalid vgdisplay -C -s
invalid vgdisplay -c -s
invalid vgdisplay -A $vg1
+invalid pvdisplay -C -A
+invalid pvdisplay -C -c
+invalid pvdisplay -C -m
+invalid pvdisplay -C -s
+invalid pvdisplay -c -m
+invalid pvdisplay -c -s
+invalid pvdisplay --alianed
+invalid pvdisplay --all
+invalid pvdisplay --noheadings
+invalid pvdisplay --options
+invalid pvdisplay --separator :
+invalid pvdisplay --sort size
+invalid pvdisplay --unbuffered
+invalid pvdisplay -A $vg1
+
+# Check exported VG listing
+vgchange -an $vg
+vgexport -a
+pvdisplay --noheadings -C -o attr,name | tee out
+not grep -v "ax-" out
+vgimport -a
+pvdisplay --noheadings -C -o attr,name | tee out
+grep -v "ax-" out
+
vgremove -ff $vg
#test vgdisplay -A to select only active VGs
9 years, 6 months