From c818e7064f461c347108ccf291e73925cb6be512 Mon Sep 17 00:00:00 2001
From: Yang Tse <yangsita@gmail.com>
Date: Thu, 19 Oct 2006 21:12:27 +0000
Subject: [PATCH] When aborting, show loop counter values when more than one
 counter exists.

---
 tests/libtest/lib504.c | 1 +
 tests/libtest/lib507.c | 1 +
 tests/libtest/lib509.c | 1 +
 tests/libtest/lib525.c | 1 +
 tests/libtest/lib526.c | 1 +
 tests/libtest/lib530.c | 1 +
 tests/libtest/lib533.c | 1 +
 7 files changed, 7 insertions(+)

diff --git a/tests/libtest/lib504.c b/tests/libtest/lib504.c
index fed91232ce..cba0691229 100644
--- a/tests/libtest/lib504.c
+++ b/tests/libtest/lib504.c
@@ -88,6 +88,7 @@ int test(char *URL)
          forever */
     } while(--loop1>0);
     if ((loop1 <= 0) || (loop2 <= 0)) {
+      fprintf(stderr, "loop1: %d loop2: %d \n", loop1, loop2);
       fprintf(stderr, "ABORTING TEST, since it seems "
               "that it would have run forever.\n");
       ret = 77;
diff --git a/tests/libtest/lib507.c b/tests/libtest/lib507.c
index e4b1e35a84..9a98da7285 100644
--- a/tests/libtest/lib507.c
+++ b/tests/libtest/lib507.c
@@ -45,6 +45,7 @@ int test(char *URL)
     }
   }
   if ((loop1 <= 0) || (loop2 <= 0)) {
+    fprintf(stderr, "loop1: %d loop2: %d \n", loop1, loop2);
     fprintf(stderr, "ABORTING TEST, since it seems "
             "that it would have run forever.\n");
     i = 77;
diff --git a/tests/libtest/lib509.c b/tests/libtest/lib509.c
index 9327d728f3..5d385c9663 100644
--- a/tests/libtest/lib509.c
+++ b/tests/libtest/lib509.c
@@ -255,6 +255,7 @@ int test(char *URL)
     }
 
     if ((loop1 <= 0) || (loop2 <= 0)) {
+      fprintf(stderr, "loop1: %d loop2: %d \n", loop1, loop2);
       fprintf(stderr, "ABORTING TEST, since it seems "
               "that it would have run forever.\n");
       i = 77;
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index b5b522de1b..35c504b97a 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -129,6 +129,7 @@ int test(char *URL)
   }
 
   if ((loop1 <= 0) || (loop2 <= 0)) {
+    fprintf(stderr, "loop1: %d loop2: %d \n", loop1, loop2);
     fprintf(stderr, "ABORTING TEST, since it seems "
             "that it would have run forever.\n");
     res = 77;
diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c
index e521b60213..91d9206e7f 100644
--- a/tests/libtest/lib526.c
+++ b/tests/libtest/lib526.c
@@ -144,6 +144,7 @@ int test(char *URL)
   }
 
   if ((loop1 <= 0) || (loop2 <= 0)) {
+    fprintf(stderr, "loop1: %d loop2: %d \n", loop1, loop2);
     fprintf(stderr, "ABORTING TEST, since it seems "
             "that it would have run forever.\n");
     res = 77;
diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c
index 6ee346d940..e73f26f362 100644
--- a/tests/libtest/lib530.c
+++ b/tests/libtest/lib530.c
@@ -98,6 +98,7 @@ int test(char *URL)
   }
 
   if ((loop1 <= 0) || (loop2 <= 0)) {
+    fprintf(stderr, "loop1: %d loop2: %d \n", loop1, loop2);
     fprintf(stderr, "ABORTING TEST, since it seems "
             "that it would have run forever.\n");
     res = 77;
diff --git a/tests/libtest/lib533.c b/tests/libtest/lib533.c
index 4403f75ff8..b0d63a10e2 100644
--- a/tests/libtest/lib533.c
+++ b/tests/libtest/lib533.c
@@ -112,6 +112,7 @@ int test(char *URL)
   }
 
   if ((loop1 <= 0) || (loop2 <= 0)) {
+    fprintf(stderr, "loop1: %d loop2: %d \n", loop1, loop2);
     fprintf(stderr, "ABORTING TEST, since it seems "
             "that it would have run forever.\n");
     res = 77;
-- 
GitLab