Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
List overview
Download
lvm2-commits
April 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
lvm2-commits@lists.fedorahosted.org
8 participants
184 discussions
Start a n
N
ew thread
master - dumpconfig: add --withfullcomments option
by David Teigland
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5f6ac1c81274de2a…
Commit: 5f6ac1c81274de2a3162764d7c4b14a80b3a5ae2 Parent: 9ce52430de8c8920e191aca8fd27be4dc8e2c96a Author: David Teigland <teigland(a)redhat.com> AuthorDate: Wed Apr 15 10:56:42 2015 -0500 Committer: David Teigland <teigland(a)redhat.com> CommitterDate: Wed Apr 15 10:56:42 2015 -0500 dumpconfig: add --withfullcomments option --withfullcomments prints all comment lines for each config option. --withcomments prints only the first comment line, which should be a short one-line summary of the option. --- WHATS_NEW | 1 + lib/config/config.c | 8 ++++++-- lib/config/config.h | 3 ++- man/lvm-dumpconfig.8.in | 7 ++++++- tools/args.h | 1 + tools/commands.h | 3 ++- tools/dumpconfig.c | 2 ++ 7 files changed, 20 insertions(+), 5 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 9313ffb..29e461c 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.119 - ================================== + Add --withfullcomments option to dumpconfig to print full comment. Check for lvm binary in blkdeactivate and skip LVM processing if not present. Add --enable-halvm and --disable-halvm options to lvmconf script. Add --services, --mirrorservice and --startstopservices option to lvmconf. diff --git a/lib/config/config.c b/lib/config/config.c index b28472b..8f116cd 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -1541,15 +1541,19 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi cfg_def = cfg_def_get_item_p(cn->id); - if (out->tree_spec->withcomments) { + if (out->tree_spec->withcomments || out->tree_spec->withfullcomments) { _cfg_def_make_path(path, sizeof(path), cfg_def->id, cfg_def, 1); fprintf(out->fp, "\n"); fprintf(out->fp, "%s# Configuration %s %s.\n", line, node_type_name, path); if (cfg_def->comment) { int pos = 0; - while (_copy_one_line(cfg_def->comment, commentline, &pos, strlen(cfg_def->comment))) + while (_copy_one_line(cfg_def->comment, commentline, &pos, strlen(cfg_def->comment))) { fprintf(out->fp, "%s# %s\n", line, commentline); + /* withcomments prints only the first comment line. */ + if (!out->tree_spec->withfullcomments) + break; + } } if (cfg_def->flags & CFG_ADVANCED) diff --git a/lib/config/config.h b/lib/config/config.h index 5fe6a9f..72c7606 100644 --- a/lib/config/config.h +++ b/lib/config/config.h @@ -144,7 +144,8 @@ struct config_def_tree_spec { uint16_t version; /* tree at this LVM2 version */ unsigned ignoreadvanced:1; /* do not include advanced configs */ unsigned ignoreunsupported:1; /* do not include unsupported configs */ - unsigned withcomments:1; /* include comments */ + unsigned withcomments:1; /* include first line of comment */ + unsigned withfullcomments:1; /* include all comment lines */ unsigned withversions:1; /* include versions */ uint8_t *check_status; /* status of last tree check (currently needed for CFG_DEF_TREE_MISSING only) */ }; diff --git a/man/lvm-dumpconfig.8.in b/man/lvm-dumpconfig.8.in index 04afce9..a4289d9 100644 --- a/man/lvm-dumpconfig.8.in +++ b/man/lvm-dumpconfig.8.in @@ -22,6 +22,7 @@ lvm-dumpconfig \(em dump LVM configuration .RB [ \-\-mergedconfig ] .RB [ \-\-validate ] .RB [ \-\-withcomments ] +.RB [ \-\-withfullcomments ] .RB [ \-\-withversions ] .RB [ ConfigurationNode... ] @@ -140,7 +141,11 @@ option is disabled. .TP .B \-\-withcomments -Also dump comments for each configuration node. +Dump a one line comment for each configuration node. + +.TP +.B \-\-withfullcomments +Dump a full comment for each configuration node. .TP .B \-\-withversions diff --git a/tools/args.h b/tools/args.h index a40cfb0..4a43457 100644 --- a/tools/args.h +++ b/tools/args.h @@ -117,6 +117,7 @@ arg(version_ARG, '\0', "version", NULL, 0) arg(vgmetadatacopies_ARG, '\0', "vgmetadatacopies", metadatacopies_arg, 0) arg(virtualoriginsize_ARG, '\0', "virtualoriginsize", size_mb_arg, 0) arg(withcomments_ARG, '\0', "withcomments", NULL, 0) +arg(withfullcomments_ARG, '\0', "withfullcomments", NULL, 0) arg(withversions_ARG, '\0', "withversions", NULL, 0) arg(writebehind_ARG, '\0', "writebehind", int_arg, 0) arg(writemostly_ARG, '\0', "writemostly", string_arg, ARG_GROUPABLE) diff --git a/tools/commands.h b/tools/commands.h index 719c507..b9c7a8b 100644 --- a/tools/commands.h +++ b/tools/commands.h @@ -70,11 +70,12 @@ xx(dumpconfig, "\t[--mergedconfig]\n" "\t[--validate]\n" "\t[--withcomments]\n" + "\t[--withfullcomments]\n" "\t[--withversions]\n" "\t[ConfigurationNode...]\n", atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG, ignoreunsupported_ARG, mergedconfig_ARG, metadataprofile_ARG, - validate_ARG, withcomments_ARG, withversions_ARG) + validate_ARG, withcomments_ARG, withfullcomments_ARG, withversions_ARG) xx(formats, "List available metadata formats", diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c index 09f2119..6d2108f 100644 --- a/tools/dumpconfig.c +++ b/tools/dumpconfig.c @@ -219,6 +219,8 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv) if (arg_count(cmd, withcomments_ARG)) tree_spec.withcomments = 1; + if (arg_count(cmd, withfullcomments_ARG)) + tree_spec.withfullcomments = 1; if (arg_count(cmd, withversions_ARG)) tree_spec.withversions = 1;
1
0
0
0
master - NIX: Also install device-mapper-persistent-data on CentOS 7 & FC 19+.
by Petr Rockai
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9ce52430de8c8920…
Commit: 9ce52430de8c8920e191aca8fd27be4dc8e2c96a Parent: 191f3cf52a0ada3aba9ac340cbab464fb05efe89 Author: Petr Rockai <prockai(a)redhat.com> AuthorDate: Wed Apr 15 16:44:15 2015 +0200 Committer: Petr Rockai <prockai(a)redhat.com> CommitterDate: Wed Apr 15 16:44:15 2015 +0200 NIX: Also install device-mapper-persistent-data on CentOS 7 & FC 19+. --- nix/default.nix | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index b8e0061..5d2a260 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -362,7 +362,7 @@ let centos65 = centos64; centos66 = centos65; centos70 = [ "dlm-devel" "dlm" "corosynclib-devel" "perl-Digest-MD5" "systemd-devel" - "procps-ng" "valgrind-devel" ]; + "device-mapper-persistent-data" "procps-ng" "valgrind-devel" ]; fedora17 = fedora18 ++ [ "libudev-devel" ];
1
0
0
0
master - tests: shell-fu
by Zdenek Kabelac
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=191f3cf52a0ada3a…
Commit: 191f3cf52a0ada3aba9ac340cbab464fb05efe89 Parent: 43a6f9e726295eaf200e7acb19d7e35b0af4aabb Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Wed Apr 15 15:07:49 2015 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Wed Apr 15 15:09:45 2015 +0200 tests: shell-fu Preserve quotes for devs and use shell arrays to pass things around. --- test/shell/pvmove-abort-all.sh | 25 +++++++++++++------------ test/shell/pvmove-abort.sh | 16 ++++++++-------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/test/shell/pvmove-abort-all.sh b/test/shell/pvmove-abort-all.sh index e6e65e5..0398c75 100644 --- a/test/shell/pvmove-abort-all.sh +++ b/test/shell/pvmove-abort-all.sh @@ -37,24 +37,25 @@ lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2" lvcreate -an -Zn -l30 -n $lv1 $vg1 "$dev4" lvextend -l+30 -n $vg1/$lv1 "$dev5" -cmd1="pvmove -i1 $backgroundarg \"$dev1\" \"$dev3\" $mode" -cmd2="pvmove -i1 $backgroundarg \"$dev2\" \"$dev3\" $mode" -cmd3="pvmove -i1 $backgroundarg -n $vg1/$lv1 \"$dev4\" \"$dev6\" $mode" +cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3") +cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3") +cmd3=(pvmove -i1 $backgroundarg $mode -n $vg1/$lv1 "$dev4" "$dev6") if test -z "$backgroundarg" ; then - $cmd1 & + "${cmd1[@]}" & aux wait_pvmove_lv_ready "$vg-pvmove0" - $cmd2 & + "${cmd2[@]}" & aux wait_pvmove_lv_ready "$vg-pvmove1" - $cmd3 & + "${cmd3[@]}" & aux wait_pvmove_lv_ready "$vg1-pvmove0" + lvs -a $vg $vg1 else - $cmd1 - aux add_to_kill_list "$cmd1" -P 1 - $cmd2 - aux add_to_kill_list "$cmd2" -P 1 - $cmd3 - aux add_to_kill_list "$cmd3" -P 1 + "${cmd1[@]}" + aux add_to_kill_list ${cmd1[*]} -P 1 + "${cmd2[@]}" + aux add_to_kill_list ${cmd2[*]} -P 1 + "${cmd3[@]}" + aux add_to_kill_list ${cmd3[*]} -P 1 fi # test removal of all pvmove LVs diff --git a/test/shell/pvmove-abort.sh b/test/shell/pvmove-abort.sh index 2c32f32..3417e77 100644 --- a/test/shell/pvmove-abort.sh +++ b/test/shell/pvmove-abort.sh @@ -31,19 +31,19 @@ do lvcreate -an -Zn -l30 -n $lv1 $vg "$dev1" lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2" -cmd1="pvmove -i1 $backgroundarg \"$dev1\" \"$dev3\" $mode" -cmd2="pvmove -i1 $backgroundarg \"$dev2\" \"$dev3\" $mode" +cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3") +cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3") if test -z "$backgroundarg" ; then - $cmd1 & + "${cmd1[@]}" & aux wait_pvmove_lv_ready "$vg-pvmove0" - $cmd2 & + "${cmd2[@]}" & aux wait_pvmove_lv_ready "$vg-pvmove1" else - $cmd1 - aux add_to_kill_list "$cmd1" -P 1 - $cmd2 - aux add_to_kill_list "$cmd2" -P 1 + "${cmd1[@]}" + aux add_to_kill_list ${cmd1[*]} -P 1 + "${cmd2[@]}" + aux add_to_kill_list ${cmd2[*]} -P 1 fi # remove specific device
1
0
0
0
master - tests: move print of replaced vars
by Zdenek Kabelac
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=43a6f9e726295eaf…
Commit: 43a6f9e726295eaf200e7acb19d7e35b0af4aabb Parent: 53c2c4562555cbc00b2b78cb4394ee3f2b7f0729 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Wed Apr 15 14:31:28 2015 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Wed Apr 15 15:09:45 2015 +0200 tests: move print of replaced vars --- test/lib/inittest.sh | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh index f55938f..3a0d332 100644 --- a/test/lib/inittest.sh +++ b/test/lib/inittest.sh @@ -86,6 +86,10 @@ prepare_test_vars test -n "$BASH" && set -eE -o pipefail +# Vars for harness +echo "@TESTDIR=$TESTDIR" +echo "@PREFIX=$PREFIX" + if test -n "$LVM_TEST_LVMETAD" ; then export LVM_LVMETAD_SOCKET="$TESTDIR/lvmetad.socket" export LVM_LVMETAD_PIDFILE="$TESTDIR/lvmetad.pid" @@ -96,9 +100,6 @@ else aux prepare_clvmd fi -# Vars for harness -echo "@TESTDIR=$TESTDIR" -echo "@PREFIX=$PREFIX" echo "<======== Processing test: \"$TESTNAME\" ========>" set -vx
1
0
0
0
master - tests: align test result in batch mode
by Zdenek Kabelac
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=53c2c4562555cbc0…
Commit: 53c2c4562555cbc00b2b78cb4394ee3f2b7f0729 Parent: e478471dd54835b88d68d6d5b372e00b311807a9 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Wed Apr 15 09:49:19 2015 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Wed Apr 15 13:35:42 2015 +0200 tests: align test result in batch mode --- test/lib/brick-shelltest.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h index 362ee8a..54114db 100644 --- a/test/lib/brick-shelltest.h +++ b/test/lib/brick-shelltest.h @@ -921,7 +921,8 @@ struct TestCase { if ( options.batch ) { int spaces = std::max( 64 - int(pretty().length()), 0 ); - progress( Last ) << " " << std::string( spaces, '.' ) << " " << r; + progress( Last ) << " " << std::string( spaces, '.' ) << " " + << std::left << std::setw( 9 ) << std::setfill( ' ' ) << r; if ( r != Journal::SKIPPED ) progress( First ) << " " << rusage(); progress( Last ) << std::endl;
1
0
0
0
master - tests: move stamp handling
by Zdenek Kabelac
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e478471dd54835b8…
Commit: e478471dd54835b88d68d6d5b372e00b311807a9 Parent: 5d4695569d58f42dfc95feda55e463ebcbf03ffb Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Wed Apr 15 13:11:26 2015 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Wed Apr 15 13:35:42 2015 +0200 tests: move stamp handling Shift stamp handling into TimedBuffer, so it's same everywhere. --- test/lib/brick-shelltest.h | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h index 4540a71..362ee8a 100644 --- a/test/lib/brick-shelltest.h +++ b/test/lib/brick-shelltest.h @@ -296,6 +296,7 @@ struct TimedBuffer { std::deque< Line > data; Line incomplete; + bool stamp; Line shift( bool force = false ) { Line result = std::make_pair( 0, "" ); @@ -309,7 +310,7 @@ struct TimedBuffer { } void push( std::string buf ) { - time_t now = time( 0 ); + time_t now = stamp ? time( 0 ) : 0; std::string::iterator b = buf.begin(), e = buf.begin(); while ( e != buf.end() ) @@ -323,6 +324,16 @@ struct TimedBuffer { if ( e != buf.end() ) { incomplete.second += "\n"; data.push_back( incomplete ); + if (incomplete.second[0] == '#') { + /* Disable timing between '## 0 STACKTRACE' & '## teardown' keywords */ + if (incomplete.second.find("# 0 STACKTRACE", 1) != std::string::npos) { + stamp = false; + now = 0; + } else if (incomplete.second.find("# teardown", 1) != std::string::npos) { + stamp = true; + now = time( 0 ); + } + } incomplete = std::make_pair( now, "" ); } b = (e == buf.end() ? e : e + 1); @@ -334,6 +345,8 @@ struct TimedBuffer { return false; return data.empty(); } + + TimedBuffer() : stamp(true) {} }; struct Sink { @@ -369,12 +382,11 @@ struct Substitute { struct Format { time_t start; - bool stamp; Substitute subst; std::string format( TimedBuffer::Line l ) { std::stringstream result; - if ( stamp ) { + if ( l.first >= start ) { time_t rel = l.first - start; result << "[" << std::setw( 2 ) << std::setfill( ' ' ) << rel / 60 << ":" << std::setw( 2 ) << std::setfill( '0' ) << rel % 60 << "] "; @@ -383,7 +395,7 @@ struct Format { return result.str(); } - Format() : start( time( 0 ) ), stamp( true ) {} + Format() : start( time( 0 ) ) {} }; struct BufSink : Sink { @@ -411,13 +423,6 @@ struct FdSink : Sink { virtual void outline( bool force ) { TimedBuffer::Line line = stream.shift( force ); - if (line.second.c_str()[0] == '#') { - /* Disable timing between STACKTRACE & teardown keywords */ - if (strstr(line.second.c_str() + 1, "# 0 STACKTRACE")) - fmt.stamp = false; - else if (strstr(line.second.c_str() + 1, "# teardown")) - fmt.stamp = true; - } std::string out = fmt.format( line ); write( fd, out.c_str(), out.length() ); }
1
0
0
0
master - tests: hide error output
by Zdenek Kabelac
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5d4695569d58f42d…
Commit: 5d4695569d58f42dfc95feda55e463ebcbf03ffb Parent: 930f0aae845e65f3673d14df97e141baccf37849 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Wed Apr 15 13:10:33 2015 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Wed Apr 15 13:35:42 2015 +0200 tests: hide error output Hide error message if pid is already away. --- test/lib/aux.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 505d15e..c28ac7b 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -218,7 +218,7 @@ kill_sleep_kill_() { slow=$2 if test -s $pidfile ; then pid=$(< $pidfile) - kill -TERM $pid || return 0 + kill -TERM $pid 2>/dev/null || return 0 if test $slow -eq 0 ; then sleep .1 ; else sleep 1 ; fi kill -KILL $pid 2>/dev/null || true wait=0
1
0
0
0
master - tests: fix aux have test
by Zdenek Kabelac
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=930f0aae845e65f3…
Commit: 930f0aae845e65f3673d14df97e141baccf37849 Parent: 1a7dd13e70e32bc519b27b509b67b0de8f86e631 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Wed Apr 15 11:51:00 2015 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Wed Apr 15 13:35:42 2015 +0200 tests: fix aux have test Previous commit has made have_cache & have_thin producing false return value. Fix it and at the some time provide much better reconfiguring warning message. If the test machine is missing needed and configured binaries it will produce TEST WARNING result. --- test/lib/aux.sh | 48 ++++++++++++++++++++++++++++-------------------- 1 files changed, 28 insertions(+), 20 deletions(-) diff --git a/test/lib/aux.sh b/test/lib/aux.sh index bc70cc0..505d15e 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -893,17 +893,21 @@ have_thin() { test "$THIN" = shared -o "$THIN" = internal || return 1 target_at_least dm-thin-pool "$@" || return 1 + declare -a CONF # disable thin_check if not present in system - test -x "$LVM_TEST_THIN_CHECK_CMD" || LVM_TEST_THIN_CHECK_CMD="" - test -x "$LVM_TEST_THIN_DUMP_CMD" || LVM_TEST_THIN_DUMP_CMD="" - test -x "$LVM_TEST_THIN_REPAIR_CMD" || LVM_TEST_THIN_REPAIR_CMD="" - test -z "$LVM_TEST_THIN_CHECK_CMD" -o \ - -z "$LVM_TEST_THIN_DUMP_CMD" -o \ - -z "$LVM_TEST_THIN_REPAIR_CMD" && { - lvmconf "global/thin_check_executable = \"$LVM_TEST_THIN_CHECK_CMD\"" \ - "global/thin_dump_executable = \"$LVM_TEST_THIN_DUMP_CMD\"" \ - "global/thin_repair_executable = \"$LVM_TEST_THIN_REPAIR_CMD\"" - } + if test -n "$LVM_TEST_THIN_CHECK_CMD" -a ! -x "$LVM_TEST_THIN_CHECK_CMD" ; then + CONF[0]="global/thin_check_executable = \"\"" + fi + if test -n "$LVM_TEST_THIN_DUMP_CMD" -a ! -x "$LVM_TEST_THIN_DUMP_CMD" ; then + CONF[1]="global/thin_dump_executable = \"\"" + fi + if test -n "$LVM_TEST_THIN_REPAIR_CMD" -a ! -x "$LVM_TEST_THIN_REPAIR_CMD" ; then + CONF[2]="global/thin_repair_executable = \"\"" + fi + if test ${#CONF[@]} -ne 0 ; then + echo "TEST WARNING: Reconfiguring ${CONF[@]}" + lvmconf "${CONF[@]}" + fi } have_raid() { @@ -915,17 +919,21 @@ have_cache() { test "$CACHE" = shared -o "$CACHE" = internal || return 1 target_at_least dm-cache "$@" + declare -a CONF # disable cache_check if not present in system - test -x "$LVM_TEST_CACHE_CHECK_CMD" || LVM_TEST_CACHE_CHECK_CMD="" - test -x "$LVM_TEST_CACHE_DUMP_CMD" || LVM_TEST_CACHE_DUMP_CMD="" - test -x "$LVM_TEST_CACHE_REPAIR_CMD" || LVM_TEST_CACHE_REPAIR_CMD="" - test -z "$LVM_TEST_CACHE_CHECK_CMD" -o \ - -z "$LVM_TEST_CACHE_DUMP_CMD" -o \ - -z "$LVM_TEST_CACHE_REPAIR_CMD" && { - lvmconf "global/cache_check_executable = \"$LVM_TEST_CACHE_CHECK_CMD\"" \ - "global/cache_dump_executable = \"$LVM_TEST_CACHE_DUMP_CMD\"" \ - "global/cache_repair_executable = \"$LVM_TEST_CACHE_REPAIR_CMD\"" - } + if test -n "$LVM_TEST_CACHE_CHECK_CMD" -a ! -x "$LVM_TEST_CACHE_CHECK_CMD" ; then + CONF[0]="global/cache_check_executable = \"\"" + fi + if test -n "$LVM_TEST_CACHE_DUMP_CMD" -a ! -x "$LVM_TEST_CACHE_DUMP_CMD" ; then + CONF[1]="global/cache_dump_executable = \"\"" + fi + if test -n "$LVM_TEST_CACHE_REPAIR_CMD" -a ! -x "$LVM_TEST_CACHE_REPAIR_CMD" ; then + CONF[2]="global/cache_repair_executable = \"\"" + fi + if test ${#CONF[@]} -ne 0 ; then + echo "TEST WARNING: Reconfiguring ${CONF[@]}" + lvmconf "${CONF[@]}" + fi } have_tool_at_least() {
1
0
0
0
master - tests: no tables for no devices
by Zdenek Kabelac
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1a7dd13e70e32bc5…
Commit: 1a7dd13e70e32bc519b27b509b67b0de8f86e631 Parent: f5466fe43597bfacb7fc70e0a61d569b6c5198c4 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Apr 14 14:56:15 2015 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Wed Apr 15 13:35:42 2015 +0200 tests: no tables for no devices If dm table does't contain any PREFIX device, don't bother to call other commands No tracing if test is skipped. --- test/lib/utils.sh | 51 +++++++++++++++++++++++++++------------------------ 1 files changed, 27 insertions(+), 24 deletions(-) diff --git a/test/lib/utils.sh b/test/lib/utils.sh index 1713cc9..e2b257d 100644 --- a/test/lib/utils.sh +++ b/test/lib/utils.sh @@ -132,6 +132,8 @@ STACKTRACE() { done fi + test -f SKIP_THIS_TEST && exit 200 + test -z "$LVM_TEST_NODEBUG" -a -f debug.log && { IDX= for i in debug.log* ; do @@ -139,39 +141,40 @@ STACKTRACE() { sed -e "s,^,## DEBUG${IDX}: ," $i IDX=$(($IDX + 1)) done - test -e clvmddebug.log && { + if test -e clvmddebug.log ; then echo "<======== CLVMD debug log ========>" sed -e "s,^,## CLVMD: ," clvmddebug.log - } - test -e strace.log && { + fi + if test -e strace.log ; then echo "<======== Strace debug log ========>" sed -e "s,^,## STRACE: ," strace.log - } - echo "<======== Info ========>" - dmsetup info -c | grep1_ "$PREFIX" | sed -e "s,^,## DMINFO: ," - echo "<======== Active table ========>" - dmsetup table | grep "$PREFIX" | sed -e "s,^,## DMTABLE: ," - echo "<======== Inactive table ========>" - dmsetup table --inactive | grep "$PREFIX" | sed -e "s,^,## DMITABLE: ," - echo "<======== Status ========>" - dmsetup status | grep "$PREFIX" | sed -e "s,^,## DMSTATUS: ," - echo "<======== Tree ========>" - dmsetup ls --tree | sed -e "s,^,## DMTREE: ," - echo "<======== Recursive list of $DM_DEV_DIR ========>" - ls -Rl --hide=shm --hide=bus --hide=snd --hide=input --hide=dri \ - --hide=net --hide=hugepages --hide=mqueue --hide=pts \ - "$DM_DEV_DIR" | sed -e "s,^,## LSLR: ," - echo "<======== Udev DB content ========>" - for i in /sys/block/dm-* /sys/block/loop* ; do - udevadm info --path "$i" || true - done | sed -e "s,^,## UDEV: ," + fi + dmsetup info -c | grep1_ "$PREFIX" > out + if test $(wc -l < out) -gt 1 ; then + echo "<======== Info ========>" + sed -e "s,^,## DMINFO: ," out + echo "<======== Active table ========>" + dmsetup table | grep "$PREFIX" | sed -e "s,^,## DMTABLE: ," + echo "<======== Inactive table ========>" + dmsetup table --inactive | grep "$PREFIX" | sed -e "s,^,## DMITABLE: ," + echo "<======== Status ========>" + dmsetup status | grep "$PREFIX" | sed -e "s,^,## DMSTATUS: ," + echo "<======== Tree ========>" + dmsetup ls --tree | sed -e "s,^,## DMTREE: ," + echo "<======== Recursive list of $DM_DEV_DIR ========>" + ls -Rl --hide=shm --hide=bus --hide=snd --hide=input --hide=dri \ + --hide=net --hide=hugepages --hide=mqueue --hide=pts \ + "$DM_DEV_DIR" | sed -e "s,^,## LSLR: ," + echo "<======== Udev DB content ========>" + for i in /sys/block/dm-* /sys/block/loop* ; do + udevadm info --query=all --path "$i" || true + done | sed -e "s,^,## UDEV: ," + fi echo "<======== Script file \"$(< TESTNAME)\" ========>" local script=$0 test -f "$script" || script="$TESTOLDPWD/$0" awk '{print "## Line:", NR, "\t", $0}' "$script" } - - test -f SKIP_THIS_TEST && exit 200 } init_udev_transaction() {
1
0
0
0
master - tests: preserve "" around dev
by Zdenek Kabelac
15 Apr '15
15 Apr '15
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f5466fe43597bfac…
Commit: f5466fe43597bfacb7fc70e0a61d569b6c5198c4 Parent: 1a814af46b6c8163c6b9b60932f9d700583914b0 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Apr 14 14:15:52 2015 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Wed Apr 15 13:35:42 2015 +0200 tests: preserve "" around dev --- test/shell/pvmove-abort-all.sh | 7 ++++--- test/shell/pvmove-abort.sh | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/shell/pvmove-abort-all.sh b/test/shell/pvmove-abort-all.sh index 3166965..e6e65e5 100644 --- a/test/shell/pvmove-abort-all.sh +++ b/test/shell/pvmove-abort-all.sh @@ -37,9 +37,10 @@ lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2" lvcreate -an -Zn -l30 -n $lv1 $vg1 "$dev4" lvextend -l+30 -n $vg1/$lv1 "$dev5" -cmd1=$(echo pvmove -i1 $backgroundarg "$dev1" "$dev3" $mode) -cmd2=$(echo pvmove -i1 $backgroundarg "$dev2" "$dev3" $mode) -cmd3=$(echo pvmove -i1 $backgroundarg -n $vg1/$lv1 "$dev4" "$dev6" $mode) +cmd1="pvmove -i1 $backgroundarg \"$dev1\" \"$dev3\" $mode" +cmd2="pvmove -i1 $backgroundarg \"$dev2\" \"$dev3\" $mode" +cmd3="pvmove -i1 $backgroundarg -n $vg1/$lv1 \"$dev4\" \"$dev6\" $mode" + if test -z "$backgroundarg" ; then $cmd1 & aux wait_pvmove_lv_ready "$vg-pvmove0" diff --git a/test/shell/pvmove-abort.sh b/test/shell/pvmove-abort.sh index 39360a0..2c32f32 100644 --- a/test/shell/pvmove-abort.sh +++ b/test/shell/pvmove-abort.sh @@ -31,8 +31,9 @@ do lvcreate -an -Zn -l30 -n $lv1 $vg "$dev1" lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2" -cmd1=$(echo pvmove -i1 $backgroundarg "$dev1" "$dev3" $mode) -cmd2=$(echo pvmove -i1 $backgroundarg "$dev2" "$dev3" $mode) +cmd1="pvmove -i1 $backgroundarg \"$dev1\" \"$dev3\" $mode" +cmd2="pvmove -i1 $backgroundarg \"$dev2\" \"$dev3\" $mode" + if test -z "$backgroundarg" ; then $cmd1 & aux wait_pvmove_lv_ready "$vg-pvmove0"
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
19
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Results per page:
10
25
50
100
200