master - libdm: drop extra space from cache target line
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ddbf0075b1abb5...
Commit: ddbf0075b1abb5ea0cb0ff56cc128fd18523ed36
Parent: fe64d3a2e27cedd7973d0a01360796089596b20b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Nov 23 23:12:43 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Nov 23 23:33:37 2015 +0100
libdm: drop extra space from cache target line
Extra space between 'cache' target and metadata device caused
string comparation being not equal and thus always causing
table reload even when uneeded.
---
WHATS_NEW_DM | 1 +
libdm/libdm-deptree.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index dd1b0b6..49aa50f 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.112 -
=====================================
+ Drop extra space from cache target line to fix unneded table reloads.
Version 1.02.111 - 23rd November 2015
=====================================
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index d7e2143..830a6a8 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -2429,7 +2429,7 @@ static int _cache_emit_segment_line(struct dm_task *dmt,
if (!_build_dev_string(origin, sizeof(origin), seg->origin))
return_0;
- EMIT_PARAMS(pos, " %s %s %s", metadata, data, origin);
+ EMIT_PARAMS(pos, "%s %s %s", metadata, data, origin);
/* Data block size */
EMIT_PARAMS(pos, " %u", seg->data_block_size);
8 years, 4 months
master - man lvmcache: include chunk size
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fe64d3a2e27ced...
Commit: fe64d3a2e27cedd7973d0a01360796089596b20b
Parent: c026846739eeea4432b75bbe8d577944f0f6b55b
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Nov 23 11:57:41 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Nov 23 11:57:41 2015 -0600
man lvmcache: include chunk size
---
man/lvmcache.7.in | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/man/lvmcache.7.in b/man/lvmcache.7.in
index 44709d1..45bb5b1 100644
--- a/man/lvmcache.7.in
+++ b/man/lvmcache.7.in
@@ -301,6 +301,35 @@ defines the default cache policy.
defines the default cache settings.
+.SS Chunk size
+
+\&
+
+The size of data blocks managed by a cache pool can be specified with the
+\-\-chunksize option when the cache LV is created. The default unit
+is KiB. The value must be a multiple of 32KiB between 32KiB and 1GiB.
+
+Using a chunk size that is too large can result in wasteful use of the
+cache, where small reads and writes can cause large sections of an LV to
+be mapped into the cache. However, choosing a chunk size that is too
+small can result in more overhead trying to manage the numerous chunks
+that become mapped into the cache. Overhead can include both excessive
+CPU time searching for chunks, and excessive memory tracking chunks.
+
+Command to display the cache pool LV chunk size:
+.br
+.B lvs \-o+chunksize VG/CacheLV
+
+.BR lvm.conf (5)
+.B cache_pool_chunk_size
+.br
+controls the default chunk size used when creating a cache LV.
+
+The default value is shown by:
+.br
+.B lvmconfig \-\-type default allocation/cache_pool_chunk_size
+
+
.SS Spare metadata LV
\&
8 years, 4 months
v2_02_135 annotated tag has been created
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=46a1ad44779476...
Commit: 46a1ad44779476c8912f4a61ca31b31b585d7a55
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2015-11-23 03:38 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2015-11-23 03:38 +0000
annotated tag: v2_02_135 has been created
at 46a1ad44779476c8912f4a61ca31b31b585d7a55 (tag)
tagging 369bc264b0db8be18243a6f95e1f6c14fdd0db99 (commit)
replaces v2_02_134
Release 2.02.135.
Another development checkpoint: Do not ship this release.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlZSioAACgkQIoGRwVZ+LBc5FACgtrDRjBiHZTVEIGysRnd+Zzue
70wAoJEv0fHy8qDzIIorDeFm3lD309kc
=IfgX
-----END PGP SIGNATURE-----
Alasdair G Kergon (4):
post-release
coverity: Add placeholder modelling file.
pvmove: Remove unused find_pvmove_lv_from_pvname.
pre-release
David Teigland (18):
lvmlockd: shut up warnings
lvmlockd: fix the NO_GL_LS condition
lvmlockd: reverse some unnecessary checking
lvmetad: change recent cleanups
vgrename: check if new and old names match
lvmetad: tail chasing to shut up coverity
lvmetad: handle duplicate VG names
tests: allow lvmetad tests with duplicate VG names
lvmetad: change the new hash to take data len
hash: add comment about multiple values
lvmetad: remove unneeded FIXME
lvmetad: use lookup_withval in another location
lvmetad: fix some error logging
lvmetad: add error explaining duplicate VG names
lvmetad: different style for hash functions
lvmetad: improve error message for VGs with same name
hash: change name of new lookup function
tests: update lvmcache-exercise
Marian Csontos (2):
tests: add missing --skip option and S env.variable
tests: stacktrace on skip if message is empty
Peter Rajnoha (4):
dev-ext: issue error if external_device_info_source=udev and udev db record incomplete
configure: check for udev_device_get_is_initialized is available
str_list: do not support str lists without mempools
libdm: report: consolidate use of string list selection structures
Stéphane Aulery (2):
clvmd: remove -v option from getopt
man: improve cmirrord.8 manpage
Zdenek Kabelac (97):
configure: report whether to build lvmlockd
libdevmapper-event: fix fifo leak on error path
dmeventd: reorder tou
dmeventd: open fifo in one function
clvmd: check for pthread_create status
dmsetup: check for NULL from dm_task_get_ioctl_timestamp
dmsetup: add missing checks for dm_stats_create() ret value
lvmetad: check for allocation fail
lvmetad: require meta_lookup
lvmetad: check for pointers not NULL
lvmetad: validate mda is not NULL
lvconvert: add extra check for existance of pointer
libdm: add missing error path check
libdm: ensure vars are initialized
libdm: exlicitly check for NULL
libdm: add test for dm_task_get_message_response()
thin: fix error path mem leak
dev-type: fix TOCTOU order
lv_manip: do not deref NULL for debug message
report: add extra pointer check
devmanager: validate target params
toollib: add missing check for lvmcache_init()
cleanup: relocate error capture
alloc: use own mem pool for alloc_handle
cleanup: drop unneded assign
cleanup: do not test alloca for NULL
cleanup: use NAME_LEN buffer instead of alloca
cleanup: use NAME_LEN
cleanup: use display_lvname
cleanup: drop unneeded header file
cleanup: use 64bit multiply for print
cleanup: keep using enum typedef
cleanup: drop unneeded assign
cleanup: use fputs for plain strings
cleanup: coverity quiet
cleanup: reoder rstatus init
cleanup: use code in place
raid: mark intententional copy and paste
lvmetad: maintain seqno as int
dmsetup: cleanup warn for older compilers
cleanup: update comment
tests: do not skip test when delay is missing
tests: update test to check for race better
lvmetad: restore use of FMTd64
libdaemon: prohibit use of %d for 64bit numbres
libdaemon: fix passing 32bit values for %d
dmsetup: one missed dms
cleanup: drop unneded headers
cleanup: use _ for local function
lvmlockd: add missing error checks
lvmlockd: enforce 64bit arithmetic
cache: ensure there is no NULL str
cleanup: ensuring string is not NULL
tests: handle missing delay_dev
libdm: replace assign with increment
raid: fix the string compare
libdm: reorder error path
dmeventd: fix check for failing open.
reporter: add missing stack trace
libdm: put in secure check
raid: ensure area_count is at least 2
debug: put stack on error path
cleanup: drop unneded check for mem
cleanup: missing check for PV2
cleanup: check LVs in one statement
cleanup: better error message
tests: without delay_dev skip some checks
coverity: hint
coverity: model some function
coverity: add few internal errors
cache: handle older metadata format
libdm: check if passed return pointer is not NULL
libdm: check for null from pool strdup
libdm: check for passed custom time value
config: check vdef pointer before dereference
format-text: ensure no division by zero
cleanup: add _free on error path
cleanup: simplify dev_cache_exit
cleanup: just alphabetically sort links
debug: lvconvert add missing display_lvname
coverity: model FD_ZERO
libdm: better error reporting from dm_split_lvm_name
libdm: fix check of pointer
libdm: update error message
raid: drop unneeded NULL test
cleanup: unify NULL custom check
cleanup: do not call vg_read with NULL mda
cleanup: add some test for NULL
cleanup: more readable code
cleanup: use embeded list
coverity: trying different model
cleanup: use display_lvname in pmspare
cleanup: add stack traces
cleanup: cast resulting value explicitely
cache: enable raid conversion for _cdata and _cmeta
cache: lvconvert repairs only thin pools
tests: more cache conversion checks
8 years, 4 months
master - post-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c026846739eeea...
Commit: c026846739eeea4432b75bbe8d577944f0f6b55b
Parent: 369bc264b0db8be18243a6f95e1f6c14fdd0db99
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Nov 23 03:40:34 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Nov 23 03:40:34 2015 +0000
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index eda7bf3..0d41f8a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.135(2)-git (2015-11-23)
+2.02.136(2)-git (2015-11-23)
diff --git a/VERSION_DM b/VERSION_DM
index 7439aaa..b849a41 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.111-git (2015-11-23)
+1.02.112-git (2015-11-23)
diff --git a/WHATS_NEW b/WHATS_NEW
index 1bbb0de..f247487 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.136 -
+=====================================
+
Version 2.02.135 - 23rd November 2015
=====================================
Add a model file for Coverity.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index d4bc242..dd1b0b6 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.112 -
+=====================================
+
Version 1.02.111 - 23rd November 2015
=====================================
Extend dm_hash to support multiple values with the same key.
8 years, 4 months
master - pre-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=369bc264b0db8b...
Commit: 369bc264b0db8be18243a6f95e1f6c14fdd0db99
Parent: da50f8bee654b029e2fc818b66765fa79a70b251
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Nov 23 03:33:43 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Nov 23 03:37:54 2015 +0000
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 7 +++++--
WHATS_NEW_DM | 5 +++--
aclocal.m4 | 2 +-
5 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/VERSION b/VERSION
index 81a0997..eda7bf3 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.135(2)-git (2015-11-09)
+2.02.135(2)-git (2015-11-23)
diff --git a/VERSION_DM b/VERSION_DM
index 934b030..7439aaa 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.111-git (2015-11-09)
+1.02.111-git (2015-11-23)
diff --git a/WHATS_NEW b/WHATS_NEW
index b0e79c8..1bbb0de 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,9 +1,12 @@
-Version 2.02.135 -
-====================================
+Version 2.02.135 - 23rd November 2015
+=====================================
+ Add a model file for Coverity.
Show correct error message for unsupported yet cache pool repair.
Allow lvconvert cache pools' data and metadata LV to raid.
Fix reading of old metadata with missing cache policy or mode settings.
Issue error if external_device_info_source=udev and udev db record incomplete.
+ Update lvmetad duplicate VG name handling to use hash function extensions.
+ Detect invalid vgrenames by vgid where the name is unchanged.
Fix passing of 32bit values through daemons (mostly lvmlockd).
Use local memory pool for whole alloc_handle manipulation.
Add missing pointer validation after dm_get_next_target().
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 5e9228a..d4bc242 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
-Version 1.02.111 -
-====================================
+Version 1.02.111 - 23rd November 2015
+=====================================
+ Extend dm_hash to support multiple values with the same key.
Add missing check for allocation inside dm_split_lvm_name().
Test dm_task_get_message_response for !NULL in dm_stats_print_region().
Add checks for failing dm_stats_create() in dmsetup.
diff --git a/aclocal.m4 b/aclocal.m4
index 05e0ad5..67b2d59 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -15,7 +15,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
-# Copyright © 2004 Scott James Remnant <scott(a)netsplit.com>.
+# Copyright (c) 2004 Scott James Remnant <scott(a)netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
8 years, 4 months
master - tests: more cache conversion checks
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=da50f8bee654b0...
Commit: da50f8bee654b029e2fc818b66765fa79a70b251
Parent: 795616a87bbb5fd2a3925e1445bb1a94ce718d55
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Nov 19 14:31:58 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 19 14:40:49 2015 +0100
tests: more cache conversion checks
---
test/shell/lvconvert-cache-raid.sh | 24 +++++++++++++++++++++++-
test/shell/lvconvert-cache.sh | 12 ++++++++++++
2 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvconvert-cache-raid.sh b/test/shell/lvconvert-cache-raid.sh
index b0d8da2..b533bdc 100644
--- a/test/shell/lvconvert-cache-raid.sh
+++ b/test/shell/lvconvert-cache-raid.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2014-2015 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
@@ -74,4 +74,26 @@ aux wait_for_sync $vg cpool_cdata
lvconvert --splitmirrors 1 --name split_meta $vg/cpool_cmeta "$dev1"
lvconvert --splitmirrors 1 --name split_data $vg/cpool_cdata "$dev1"
+lvremove -f $vg
+
+
+# Test up/down raid conversion of cache pool data and metadata
+lvcreate --type cache-pool $vg/cpool -l 10
+lvcreate -n corigin -H $vg/cpool -l 20
+
+lvconvert -m+1 --type raid1 $vg/cpool_cmeta
+check lv_field $vg/cpool_cmeta layout "raid,raid1"
+check lv_field $vg/cpool_cmeta role "private,cache,pool,metadata"
+
+lvconvert -m+1 --type raid1 $vg/cpool_cdata
+check lv_field $vg/cpool_cdata layout "raid,raid1"
+check lv_field $vg/cpool_cdata role "private,cache,pool,data"
+
+lvconvert -m-1 $vg/cpool_cmeta
+check lv_field $vg/cpool_cmeta layout "linear"
+lvconvert -m-1 $vg/cpool_cdata
+check lv_field $vg/cpool_cdata layout "linear"
+
+lvremove -f $vg
+
vgremove -f $vg
diff --git a/test/shell/lvconvert-cache.sh b/test/shell/lvconvert-cache.sh
index 5a38d9c..de88032 100644
--- a/test/shell/lvconvert-cache.sh
+++ b/test/shell/lvconvert-cache.sh
@@ -135,6 +135,18 @@ fail lvconvert --yes --type cache-pool --chunksize 16M --poolmetadata $lv2 $vg/$
lvremove -f $vg
+########################
+# Repair of cache pool #
+########################
+lvcreate --type cache-pool -an -v -L 2 -n cpool $vg
+lvcreate -H -L 4 -n corigin --cachepool $vg/cpool
+
+# unsupported yet
+fail lvconvert --repair $vg/cpool 2>&1 | tee out
+grep "not yet implemented" out
+
+lvremove -f $vg
+
##########################
# Prohibited conversions #
##########################
8 years, 4 months
master - cache: lvconvert repairs only thin pools
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=795616a87bbb5f...
Commit: 795616a87bbb5fd2a3925e1445bb1a94ce718d55
Parent: d1608345dffd912dd591d71a147c5acf587cf7fe
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Nov 19 13:32:03 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 19 14:40:24 2015 +0100
cache: lvconvert repairs only thin pools
Avoid internal error message where thin pool repair code tries to
fix cache pool - was catched later in code stack, so rather
catch this early and make the repair function exlusive
to thin pools.
So far we have no code for repairing cache pools
(other then the automatic during activation/deactivation).
---
WHATS_NEW | 1 +
tools/lvconvert.c | 13 +++++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 0519527..b0e79c8 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.135 -
====================================
+ Show correct error message for unsupported yet cache pool repair.
Allow lvconvert cache pools' data and metadata LV to raid.
Fix reading of old metadata with missing cache policy or mode settings.
Issue error if external_device_info_source=udev and udev db record incomplete.
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 19ee607..72be45b 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2320,9 +2320,9 @@ out:
return r;
}
-static int _lvconvert_pool_repair(struct cmd_context *cmd,
- struct logical_volume *pool_lv,
- struct lvconvert_params *lp)
+static int _lvconvert_thin_pool_repair(struct cmd_context *cmd,
+ struct logical_volume *pool_lv,
+ struct lvconvert_params *lp)
{
const char *dmdir = dm_dir();
const char *thin_dump =
@@ -3270,7 +3270,12 @@ static int _lvconvert_single(struct cmd_context *cmd, struct logical_volume *lv,
if (arg_count(cmd, repair_ARG)) {
if (lv_is_pool(lv)) {
- if (!_lvconvert_pool_repair(cmd, lv, lp))
+ if (lv_is_cache_pool(lv)) {
+ log_error("Repair for cache pool %s not yet implemented.",
+ display_lvname(lv));
+ return ECMD_FAILED;
+ }
+ if (!_lvconvert_thin_pool_repair(cmd, lv, lp))
return_ECMD_FAILED;
return ECMD_PROCESSED;
}
8 years, 4 months
master - cache: enable raid conversion for _cdata and _cmeta
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d1608345dffd91...
Commit: d1608345dffd912dd591d71a147c5acf587cf7fe
Parent: 6f002c29a56d4e80ff7ebc9b8a5334c2599e663a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Nov 19 13:30:55 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 19 14:38:36 2015 +0100
cache: enable raid conversion for _cdata and _cmeta
Since thin-pool supports convertion of data and metadata LV,
enable the same for cache data and metadata LV.
---
WHATS_NEW | 1 +
tools/lvconvert.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index d5a4a3b..0519527 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.135 -
====================================
+ Allow lvconvert cache pools' data and metadata LV to raid.
Fix reading of old metadata with missing cache policy or mode settings.
Issue error if external_device_info_source=udev and udev db record incomplete.
Fix passing of 32bit values through daemons (mostly lvmlockd).
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 3cfd915..19ee607 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -199,6 +199,8 @@ static int _lvconvert_name_params(struct lvconvert_params *lp,
!arg_count(cmd, splitmirrors_ARG) &&
!strstr(lp->lv_name, "_tdata") &&
!strstr(lp->lv_name, "_tmeta") &&
+ !strstr(lp->lv_name, "_cdata") &&
+ !strstr(lp->lv_name, "_cmeta") &&
!apply_lvname_restrictions(lp->lv_name))
return_0;
8 years, 4 months
master - tests: stacktrace on skip if message is empty
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6f002c29a56d4e...
Commit: 6f002c29a56d4e80ff7ebc9b8a5334c2599e663a
Parent: 2a23550cf3f3ecf6f3daec211e2304444170daf3
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Thu Nov 19 12:11:58 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 19 12:18:33 2015 +0100
tests: stacktrace on skip if message is empty
---
test/lib/utils.sh | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/test/lib/utils.sh b/test/lib/utils.sh
index 24c9076..6745c1b 100644
--- a/test/lib/utils.sh
+++ b/test/lib/utils.sh
@@ -107,7 +107,7 @@ grep1_() {
awk -v pattern="${1}" 'NR==1 || $0~pattern' "${@:2}"
}
-STACKTRACE() {
+stacktrace() {
trap - ERR
local i=0
@@ -116,6 +116,13 @@ STACKTRACE() {
echo "## $i ${FUNC}() called from ${BASH_SOURCE[$i]}:${BASH_LINENO[$i]}"
i=$(($i + 1))
done
+}
+
+STACKTRACE() {
+ trap - ERR
+ local i=0
+
+ stacktrace
test "${LVM_TEST_PARALLEL:-0}" -eq 1 -o -n "$RUNNING_DMEVENTD" -o -f LOCAL_DMEVENTD || {
pgrep dmeventd &>/dev/null && \
@@ -211,7 +218,11 @@ dm_table() {
}
skip() {
- test "$#" -eq 0 || echo "TEST SKIPPED: $@"
+ if test "$#" -eq 0; then
+ stacktrace
+ else
+ echo "TEST SKIPPED: $@"
+ fi
touch SKIP_THIS_TEST
exit 200
}
8 years, 4 months
master - tests: add missing --skip option and S env.variable
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2a23550cf3f3ec...
Commit: 2a23550cf3f3ecf6f3daec211e2304444170daf3
Parent: 0614c63579b9ab6ebf68b957b4de3806f231a14c
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Thu Nov 19 10:48:17 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 19 12:00:59 2015 +0100
tests: add missing --skip option and S env.variable
---
test/lib/brick-shelltest.h | 40 ++++++++++++++++++++++++++++++++--------
1 files changed, 32 insertions(+), 8 deletions(-)
diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h
index cc7135f..be7c3fe 100644
--- a/test/lib/brick-shelltest.h
+++ b/test/lib/brick-shelltest.h
@@ -675,7 +675,7 @@ bool interrupt = false;
struct Options {
bool verbose, batch, interactive, cont, fatal_timeouts, kmsg;
std::string testdir, outdir, workdir, heartbeat;
- std::vector< std::string > flavours, filter, watch;
+ std::vector< std::string > flavours, filter, skip, watch;
std::string flavour_envvar;
int timeout;
Options() : verbose( false ), batch( false ), interactive( false ),
@@ -986,6 +986,7 @@ struct Main {
Cases cases;
void setup() {
+ bool filter;
Listing l = listdir( options.testdir, true );
std::sort( l.begin(), l.end() );
@@ -997,15 +998,33 @@ struct Main {
continue;
if ( i->substr( 0, 4 ) == "lib/" )
continue;
- bool filter = !options.filter.empty();
- for ( std::vector< std::string >::iterator filt = options.filter.begin();
- filt != options.filter.end(); ++filt ) {
- if ( i->find( *filt ) != std::string::npos )
- filter = false;
+ if (!options.filter.empty()) {
+ filter = true;
+ for ( std::vector< std::string >::iterator filt = options.filter.begin();
+ filt != options.filter.end(); ++filt ) {
+ if ( i->find( *filt ) != std::string::npos ) {
+ filter = false;
+ break;
+ }
+ }
+ if ( filter )
+ continue;
}
- if ( filter )
- continue;
+
+ if (!options.skip.empty()) {
+ filter = false;
+ for ( std::vector< std::string >::iterator filt = options.skip.begin();
+ filt != options.skip.end(); ++filt ) {
+ if ( i->find( *filt ) != std::string::npos ) {
+ filter = true;
+ break;
+ }
+ }
+ if ( filter )
+ continue;
+ }
+
cases.push_back( TestCase( journal, options, options.testdir + *i, *i, *flav ) );
cases.back().options = options;
}
@@ -1215,6 +1234,11 @@ static int run( int argc, const char **argv, std::string fl_envvar = "TEST_FLAVO
else if ( hasenv( "T" ) )
split( getenv( "T" ), opt.filter );
+ if ( args.has( "--skip" ) )
+ split( args.opt( "--skip" ), opt.skip );
+ else if ( hasenv( "S" ) )
+ split( getenv( "S" ), opt.skip );
+
if ( args.has( "--fatal-timeouts" ) )
opt.fatal_timeouts = true;
8 years, 4 months