diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-05-03 12:13:17 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-05-03 12:13:17 +0400 |
commit | e32a14ca19b05a542b3971987a41104664bc197b (patch) | |
tree | c72bd1f71c901a25f4e90212a3500ecaba615c03 /newlib | |
parent | a696306141ebed976e4af092e1954d5f67645faa (diff) |
* testsuite/newlib.string/strcmp-1.c (LONG_TEST): New macro.
(MAX_BLOCK_SIZE): Use small value when LONG_TEST is not set.
(MAX_DIFF, MAX_LEN, MAX_ZEROS) Likewise.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 6 | ||||
-rw-r--r-- | newlib/testsuite/newlib.string/strcmp-1.c | 29 |
2 files changed, 34 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 30f3d37ca..930e3f6b0 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2012-05-03 Greta Yorsh <Greta.Yorsh@arm.com> + + * testsuite/newlib.string/strcmp-1.c (LONG_TEST): New macro. + (MAX_BLOCK_SIZE): Use small value when LONG_TEST is not set. + (MAX_DIFF, MAX_LEN, MAX_ZEROS) Likewise. + 2012-03-29 Corinna Vinschen <vinschen@redhat.com> * libc/locale/locale.c (__mb_cur_max): On Cygwin, align default value diff --git a/newlib/testsuite/newlib.string/strcmp-1.c b/newlib/testsuite/newlib.string/strcmp-1.c index 81f4a1f86..a5258999f 100644 --- a/newlib/testsuite/newlib.string/strcmp-1.c +++ b/newlib/testsuite/newlib.string/strcmp-1.c @@ -31,6 +31,9 @@ #include <stdio.h> #include <stdarg.h> +/* The macro LONG_TEST controls whether a short or a more comprehensive test + of strcmp should be performed. */ +#ifdef LONG_TEST #ifndef BUFF_SIZE #define BUFF_SIZE 1024 #endif @@ -54,11 +57,35 @@ #ifndef MAX_ZEROS #define MAX_ZEROS 8 #endif +#else /* not defined LONG_TEST */ +#ifndef BUFF_SIZE +#define BUFF_SIZE 1024 +#endif + +#ifndef MAX_BLOCK_SIZE +#define MAX_BLOCK_SIZE 64 +#endif + +#ifndef MAX_OFFSET +#define MAX_OFFSET 3 +#endif + +#ifndef MAX_DIFF +#define MAX_DIFF 4 +#endif + +#ifndef MAX_LEN +#define MAX_LEN 4 +#endif + +#ifndef MAX_ZEROS +#define MAX_ZEROS 4 +#endif +#endif /* not defined LONG_TEST */ #if (MAX_OFFSET >= 26) #error "MAX_OFFSET >= 26" #endif - #if (MAX_OFFSET + MAX_BLOCK_SIZE + MAX_DIFF + MAX_LEN + MAX_ZEROS >= BUFF_SIZE) #error "Buffer overrun: MAX_OFFSET + MAX_BLOCK_SIZE + MAX_DIFF + MAX_LEN + MAX_ZEROS >= BUFF_SIZE." #endif |