This is an automated email from the git hooks/post-receive script. adconrad pushed a commit to branch glibc-2.23 in repository glibc.
commit 1b8dbaf129ae427e53cd26ed2ca509c23ce4631b Author: Adam Conrad <[email protected]> Date: Thu Mar 17 08:45:15 2016 -0600 debian/patches/any/cvs-tst-malloc-thread-exit.diff: Backport fix from upstream to make tst-malloc-thread-exit use fewer system resources. --- debian/changelog | 2 + debian/patches/any/cvs-tst-malloc-thread-exit.diff | 74 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 77 insertions(+) diff --git a/debian/changelog b/debian/changelog index 83a4412..6a816e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ glibc (2.23-0experimental1) UNRELEASED; urgency=medium * testsuite-xfail-debian.mk: Skip test which just overflows memory. [ Adam Conrad ] + * debian/patches/any/cvs-tst-malloc-thread-exit.diff: Backport fix from + upstream to make tst-malloc-thread-exit use fewer system resources. * debian/control.in/i386: Remove list of Breaks that predate oldstable. -- Aurelien Jarno <[email protected]> Mon, 14 Mar 2016 00:14:11 +0100 diff --git a/debian/patches/any/cvs-tst-malloc-thread-exit.diff b/debian/patches/any/cvs-tst-malloc-thread-exit.diff new file mode 100644 index 0000000..04c2610 --- /dev/null +++ b/debian/patches/any/cvs-tst-malloc-thread-exit.diff @@ -0,0 +1,74 @@ +commit 2a38688932243b5b16fb12d84c7ac1138ce50363 +Author: Florian Weimer <[email protected]> +Date: Fri Feb 19 14:11:32 2016 +0100 + + tst-malloc-thread-exit: Use fewer system resources + ++2016-02-19 Florian Weimer <[email protected]> ++ ++ * malloc/tst-malloc-thread-exit.c: Include test-skeleton.c early. ++ (do_test): Limit the number of arenas, so that we can use fewer ++ outer threads. Limit timeout to 3 seconds, in preparation for a ++ larger TIMEOUT value. ++ +diff --git a/malloc/tst-malloc-thread-exit.c b/malloc/tst-malloc-thread-exit.c +index f4aa21a..fa6ebf9 100644 +--- a/malloc/tst-malloc-thread-exit.c ++++ b/malloc/tst-malloc-thread-exit.c +@@ -26,13 +26,17 @@ + particularly related to the arena free list. */ + + #include <errno.h> ++#include <malloc.h> + #include <pthread.h> + #include <stdbool.h> + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> + +-#define TIMEOUT 7 ++static int do_test (void); ++ ++#define TEST_FUNCTION do_test () ++#include "../test-skeleton.c" + + static bool termination_requested; + static int inner_thread_count = 4; +@@ -156,20 +160,20 @@ outer_thread (void *closure) + static int + do_test (void) + { +- /* The number of top-level threads should be equal to the number of +- arenas. See arena_get2. */ +- long outer_thread_count = sysconf (_SC_NPROCESSORS_ONLN); +- if (outer_thread_count >= 1) ++ /* The number of threads should be smaller than the number of ++ arenas, so that there will be some free arenas to add to the ++ arena free list. */ ++ enum { outer_thread_count = 2 }; ++ if (mallopt (M_ARENA_MAX, 8) == 0) + { +- /* See NARENAS_FROM_NCORES in malloc.c. */ +- if (sizeof (long) == 4) +- outer_thread_count *= 2; +- else +- outer_thread_count *= 8; ++ printf ("error: mallopt (M_ARENA_MAX) failed\n"); ++ return 1; + } + + /* Leave some room for shutting down all threads gracefully. */ +- int timeout = TIMEOUT - 2; ++ int timeout = 3; ++ if (timeout > TIMEOUT) ++ timeout = TIMEOUT - 1; + + pthread_t *threads = calloc (sizeof (*threads), outer_thread_count); + if (threads == NULL) +@@ -212,6 +216,3 @@ do_test (void) + + return 0; + } +- +-#define TEST_FUNCTION do_test () +-#include "../test-skeleton.c" diff --git a/debian/patches/series b/debian/patches/series index 6d5569e..79e347f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -211,3 +211,4 @@ any/local-libpic.diff any/local-bootstrap-headers.diff any/submitted-argp-attribute.diff any/submitted-dlopen-noload.diff +any/cvs-tst-malloc-thread-exit.diff -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git

