* 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.
This commit is contained in:
Corinna Vinschen 2012-05-03 08:13:17 +00:00
parent a696306141
commit e32a14ca19
2 changed files with 34 additions and 1 deletions

View File

@ -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

View File

@ -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