summaryrefslogtreecommitdiff
path: root/libc/debug/tst-backtrace3.c
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-03-03 17:10:55 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-03-03 17:10:55 +0000
commitd15f124ff59606604c0243ee19cd67bc99ecd09f (patch)
treef0b18e431b15b797d5f5dc980928cd1a26b8f74a /libc/debug/tst-backtrace3.c
parentc1078e9067234e88d5c1ca8af18ae67b64141d66 (diff)
downloadeglibc2-d15f124ff59606604c0243ee19cd67bc99ecd09f.tar.gz
Merge changes between r22241 and r22552 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@22553 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/debug/tst-backtrace3.c')
-rw-r--r--libc/debug/tst-backtrace3.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/libc/debug/tst-backtrace3.c b/libc/debug/tst-backtrace3.c
index 4d3309b3a..182f42392 100644
--- a/libc/debug/tst-backtrace3.c
+++ b/libc/debug/tst-backtrace3.c
@@ -22,27 +22,15 @@
#include <stdlib.h>
#include <string.h>
+#include "tst-backtrace.h"
+
static int do_test (void);
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
-/* Set to a non-zero value if the test fails. */
-int ret;
-
-/* Accesses to X are used to prevent optimization. */
-volatile int x;
-
-/* Called if the test fails. */
-#define FAIL() \
- do { printf ("Failure on line %d\n", __LINE__); ret = 1; } while (0)
-
/* The backtrace should include at least 3 * fn, and do_test. */
#define NUM_FUNCTIONS 4
-/* Use this attribute to prevent inlining, so that all expected frames
- are present. */
-#define NO_INLINE __attribute__ ((noinline))
-
NO_INLINE int
fn (int c)
{
@@ -77,7 +65,7 @@ fn (int c)
printf ("Function %d: %s\n", i, symbols[i]);
/* Check that the function names obtained are accurate. */
for (i = 0; i < n - 1; ++i)
- if (strstr (symbols[i], "fn") == NULL)
+ if (!match (symbols[i], "fn"))
{
FAIL ();
return 1;