public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test Makefile.in harness.c t-lvconvert-re ...
@ 2010-05-12 11:23 mornfall
0 siblings, 0 replies; only message in thread
From: mornfall @ 2010-05-12 11:23 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall@sourceware.org 2010-05-12 11:23:16
Modified files:
test : Makefile.in harness.c
t-lvconvert-repair-dmeventd.sh test-utils.sh
Log message:
Revert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
to a file using log/file, with log/overwrite set and dump this file in
STACKTRACE. The overall effect is that only the command that ran last before
the failure has been triggered will get its debug output logged. This is
similar to how we treat coredumps.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/Makefile.in.diff?cvsroot=lvm2&r1=1.40&r2=1.41
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/harness.c.diff?cvsroot=lvm2&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-dmeventd.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/test-utils.sh.diff?cvsroot=lvm2&r1=1.40&r2=1.41
--- LVM2/test/Makefile.in 2010/05/06 18:54:51 1.40
+++ LVM2/test/Makefile.in 2010/05/12 11:23:16 1.41
@@ -84,6 +84,7 @@
LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd/plugins/mirror"; \
LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd/plugins/snapshot"; \
echo "export LD_LIBRARY_PATH=\"$$LDLPATH\"" >> $@-t
+ echo 'top_srcdir=$(top_srcdir)' >> $@-t
echo 'abs_srcdir=$(abs_srcdir)' >> $@-t
echo 'abs_builddir=$(abs_builddir)' >> $@-t
echo 'export PATH' >> $@-t
--- LVM2/test/harness.c 2010/04/30 14:33:39 1.11
+++ LVM2/test/harness.c 2010/05/12 11:23:16 1.12
@@ -20,7 +20,6 @@
};
struct stats s;
-struct stats backup;
char *readbuf = NULL;
int readbuf_sz = 0, readbuf_used = 0;
@@ -142,7 +141,6 @@
int main(int argc, char **argv) {
int i;
- int repeat = getenv("LVM_TEST_NOVERBOSE") ? 0 : 1;
if (argc >= MAX) {
fprintf(stderr, "Sorry, my head exploded. Please increase MAX.\n");
@@ -178,13 +176,6 @@
run(i, argv[i]);
if (die)
break;
- if ( repeat && s.status[i] == FAILED ) {
- backup = s;
- setenv("LVM_TEST_CONFIG", config_debug, 1);
- run(i, argv[i]);
- setenv("LVM_TEST_CONFIG", config, 1);
- s = backup;
- }
}
printf("\n## %d tests: %d OK, %d warnings, %d failures; %d skipped\n",
--- LVM2/test/t-lvconvert-repair-dmeventd.sh 2010/05/06 19:01:26 1.1
+++ LVM2/test/t-lvconvert-repair-dmeventd.sh 2010/05/12 11:23:16 1.2
@@ -20,7 +20,7 @@
lvchange --monitor y $vg/4way
disable_dev $dev2 $dev4
mkfs.ext2 $DM_DEV_DIR/$vg/4way
-sleep 3 # FIXME : - (
+sleep 3 # FIXME: need a "poll" utility, akin to "check"
enable_dev $dev2 $dev4
check mirror $vg 4way
check mirror_legs $vg 4way 2
--- LVM2/test/test-utils.sh 2010/05/12 10:08:36 1.40
+++ LVM2/test/test-utils.sh 2010/05/12 11:23:16 1.41
@@ -17,23 +17,27 @@
STACKTRACE() {
trap - ERR;
i=0;
+
while FUNC=${FUNCNAME[$i]}; test "$FUNC" != "main"; do
echo "$i ${FUNC}() called from ${BASH_SOURCE[$i]}:${BASH_LINENO[$i]}"
i=$(($i + 1));
done
# Get backtraces from coredumps
- TEST_LVM_BINARY=$(dirname $(which lvm))/../../tools/lvm
if which gdb >& /dev/null; then
echo bt full > gdb_commands.txt
echo l >> gdb_commands.txt
echo quit >> gdb_commands.txt
- for core in core*; do
+ for core in `ls core* 2>/dev/null`; do
bin=$(gdb -batch -c $core 2>&1 | grep "generated by" | \
sed -e "s,.*generated by \`\([^ ']*\).*,\1,")
gdb -batch -c $core -x gdb_commands.txt `which $bin`
done
fi
+
+ test -f debug.log && {
+ sed -e "s,^,## DEBUG: ,;s,$top_srcdir/\?,," < debug.log
+ }
}
init_udev_transaction() {
@@ -367,6 +371,9 @@
log {
syslog = 0
indent = 1
+ level = 4
+ file = "$TESTDIR/debug.log"
+ overwrite = 1
}
backup {
backup = 0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-12 11:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-12 11:23 LVM2/test Makefile.in harness.c t-lvconvert-re mornfall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).