All of lore.kernel.org
 help / color / mirror / Atom feed
From: mornfall@sourceware.org <mornfall@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/test Makefile.in harness.c t-lvconvert-re ...
Date: 12 May 2010 11:23:16 -0000	[thread overview]
Message-ID: <20100512112316.18651.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall at 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



                 reply	other threads:[~2010-05-12 11:23 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=20100512112316.18651.qmail@sourceware.org \
    --to=mornfall@sourceware.org \
    --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.