diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-12-19 16:40:59 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-12-20 10:18:57 +0100 |
commit | 011c3d964b1912151444527c4f92e8c752638126 (patch) | |
tree | 59b0cea0200a0fcd9cf86fa853eebc8cce949140 /tests/slow/hash-large.c | |
parent | e59a3d4b166cf6773e6c2f425a0f03bf44006d08 (diff) | |
download | gnutls-011c3d964b1912151444527c4f92e8c752638126.tar.gz |
tests: hash-large: increase parallelism to allow fast run in CItmp-speedup-hash-tests
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests/slow/hash-large.c')
-rw-r--r-- | tests/slow/hash-large.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/tests/slow/hash-large.c b/tests/slow/hash-large.c index 5c3fd2ce51..4c9846453e 100644 --- a/tests/slow/hash-large.c +++ b/tests/slow/hash-large.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2016 Nikos Mavrogiannopoulos + * Copyright (C) 2017 Red Hat, Inc. * * This file is part of GnuTLS. * @@ -13,9 +14,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> */ #ifdef HAVE_CONFIG_H @@ -29,14 +29,15 @@ #include <limits.h> #include "utils.h" -#if defined(__FreeBSD__) -/* its libc cannot handle that large allocations */ +#if defined(__FreeBSD__) || !defined(HAVE_MMAP) void doit(void) { exit(77); } -#else /* not freebsd */ +#else /* working test */ + +/* Test hashing on very large buffers >= 2^31 */ #if !defined(_WIN32) # include <signal.h> @@ -50,10 +51,6 @@ static void exit_77(int signo) #define MIN(x,y) ((x)<(y))?(x):(y) -/* Test hashing on large buffers */ - -#ifdef HAVE_MMAP - #include <sys/mman.h> static size_t _mmap_size; @@ -72,13 +69,6 @@ static void put_mem(void *mem) munmap(mem, _mmap_size); } -#else - -# define get_mem(x) calloc(1, x) -# define put_mem(x) free(x) - -#endif - void doit(void) { unsigned char digest[32]; |