aboutsummaryrefslogtreecommitdiff
path: root/libiberty/testsuite/test-doubly-linked-list.c
diff options
context:
space:
mode:
authorMatthieu Longo <matthieu.longo@arm.com>2025-08-04 11:04:13 +0100
committerMatthieu Longo <matthieu.longo@arm.com>2025-08-07 10:33:44 +0100
commit815d9e9dae61da40e93ff5bc88cb771abf36e063 (patch)
treef590439821fae4f2e2fa4880a0d91100955c2e90 /libiberty/testsuite/test-doubly-linked-list.c
parent3eede6b04a30243fdc4acece156be95b17c16f83 (diff)
downloadgdb-815d9e9dae61da40e93ff5bc88cb771abf36e063.zip
gdb-815d9e9dae61da40e93ff5bc88cb771abf36e063.tar.gz
gdb-815d9e9dae61da40e93ff5bc88cb771abf36e063.tar.bz2
libiberty: sync with gcc
Import the following commits from GCC as of r16-3056-gca2169c65bd169: 0d0837df697 libiberty: disable logging of list content for doubly-linked list tests
Diffstat (limited to 'libiberty/testsuite/test-doubly-linked-list.c')
-rw-r--r--libiberty/testsuite/test-doubly-linked-list.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libiberty/testsuite/test-doubly-linked-list.c b/libiberty/testsuite/test-doubly-linked-list.c
index 1e1fc63..93fe19a 100644
--- a/libiberty/testsuite/test-doubly-linked-list.c
+++ b/libiberty/testsuite/test-doubly-linked-list.c
@@ -155,19 +155,26 @@ bool check(const char *op,
bool success = true;
bool res;
- l_print (wrapper->first);
+#define DUMP_LIST 0
+
+ if (DUMP_LIST)
+ l_print (wrapper->first);
+
res = run_test (expect, wrapper, false);
printf ("%s: test-linked-list::%s: check forward conformity\n",
res ? "PASS": "FAIL", op);
success &= res;
- l_reverse_print (wrapper->last);
+ if (DUMP_LIST)
+ l_reverse_print (wrapper->last);
+
res = run_test (expect, wrapper, true);
printf ("%s: test-linked-list::%s: check backward conformity\n",
res ? "PASS": "FAIL", op);
success &= res;
- printf("\n");
+ if (DUMP_LIST)
+ printf("\n");
return success;
}