From 5d41d91a3e819098c7b5730dfbafb4dd74c61817 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 6 Oct 2012 16:04:56 -0700 Subject: Add a strstr test for page boundary --- string/test-strstr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'string/test-strstr.c') diff --git a/string/test-strstr.c b/string/test-strstr.c index 1aebd351c3..d4c0efc5ba 100644 --- a/string/test-strstr.c +++ b/string/test-strstr.c @@ -161,10 +161,15 @@ check2 (void) { const char s1[] = ", enable_static, \0, enable_shared, "; char *exp_result; + char *s2 = (void *) buf1 + page_size - 18; + strcpy (s2, s1); exp_result = stupid_strstr (s1, s1 + 18); FOR_EACH_IMPL (impl, 0) - check_result (impl, s1, s1 + 18, exp_result); + { + check_result (impl, s1, s1 + 18, exp_result); + check_result (impl, s2, s1 + 18, exp_result); + } } static int -- cgit v1.2.1