]> sourceware.org Git - lvm2.git/commitdiff
Re-run failing tests with log/verbose=4 (-vvvv) to help with debugging.
authorPetr Rockai <prokai@redhat.com>
Wed, 31 Mar 2010 22:18:17 +0000 (22:18 +0000)
committerPetr Rockai <prokai@redhat.com>
Wed, 31 Mar 2010 22:18:17 +0000 (22:18 +0000)
test/harness.c
test/test-utils.sh

index bdf6358b56026d6e891fc939207b786c4404ba25..5788c9c481424800dbaa10d2737357da1a6d0ddc 100644 (file)
@@ -126,6 +126,9 @@ void run(int i, char *f) {
 int main(int argc, char **argv) {
        int i;
        status = alloca(sizeof(int)*argc);
+       char *config = getenv("LVM_TEST_CONFIG"),
+            *config_debug;
+       asprintf(&config_debug, "%s\n%s", config ? config : "", "log {\n verbose=4\n }");
 
        if (socketpair(PF_UNIX, SOCK_STREAM, 0, fds)) {
                perror("socketpair");
@@ -149,6 +152,12 @@ int main(int argc, char **argv) {
                run(i, argv[i]);
                if (die)
                        break;
+               if ( status[i] == FAILED ) {
+                       setenv("LVM_TEST_CONFIG", config_debug, 1);
+                       run(i, argv[i]);
+                       setenv("LVM_TEST_CONFIG", config, 1);
+                       status[i] = FAILED; /* just in case */
+               }
        }
 
        printf("\n## %d tests: %d OK, %d failed, %d skipped\n",
index 8d7e1fd73f6ab6dcf4b6789580465fcf73e36dfc..f5c41ba4e1482eca91fd5de14bd41d75084cffeb 100644 (file)
@@ -316,6 +316,7 @@ prepare_lvmconf() {
         locktype=
        if test -n "$LVM_TEST_LOCKING"; then locktype="locking_type = $LVM_TEST_LOCKING"; fi
        cat > $G_root_/etc/lvm.conf <<-EOF
+  $LVM_TEST_CONFIG
   devices {
     dir = "$G_dev_"
     scan = "$G_dev_"
@@ -324,7 +325,6 @@ prepare_lvmconf() {
     sysfs_scan = 0
   }
   log {
-    verbose = $verboselevel
     syslog = 0
     indent = 1
   }
This page took 0.040628 seconds and 5 git commands to generate.