public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>,
	 Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	Florian Weimer <fweimer@redhat.com>
Subject: [PATCH] ld.so: Unset glibc tunables for --list-tunables test
Date: Tue, 2 Feb 2021 09:36:05 -0800	[thread overview]
Message-ID: <CAMe9rOph540jV_QRn=P6p=RkKmE5hUUMMVWiAAuheJSse18n_A@mail.gmail.com> (raw)
In-Reply-To: <877dnqvipw.fsf@igel.home>

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

On Tue, Feb 2, 2021 at 2:59 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Jan 14 2021, H.J. Lu via Libc-alpha wrote:
>
> > diff --git a/elf/tst-rtld-list-tunables.exp b/elf/tst-rtld-list-tunables.exp
> > new file mode 100644
> > index 0000000000..4f3f7ee4e3
> > --- /dev/null
> > +++ b/elf/tst-rtld-list-tunables.exp
> > @@ -0,0 +1,14 @@
> > +glibc.malloc.arena_max: 0x0 (min: 0x1, max: 0x[f]+)
> > +glibc.malloc.arena_test: 0x0 (min: 0x1, max: 0x[f]+)
> > +glibc.malloc.check: 0 (min: 0, max: 3)
> > +glibc.malloc.mmap_max: 0 (min: -2147483648, max: 2147483647)
> > +glibc.malloc.mmap_threshold: 0x0 (min: 0x0, max: 0x[f]+)
> > +glibc.malloc.mxfast: 0x0 (min: 0x0, max: 0x[f]+)
> > +glibc.malloc.perturb: 0 (min: 0, max: 255)
> > +glibc.malloc.tcache_count: 0x0 (min: 0x0, max: 0x[f]+)
> > +glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+)
> > +glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+)
> > +glibc.malloc.top_pad: 0x0 (min: 0x0, max: 0x[f]+)
> > +glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+)
> > +glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10)
> > +glibc.rtld.optional_static_tls: 0x200 (min: 0x0, max: 0x[f]+)
>
> This won't match if MALLOC_PERTURB_ is set.
>
> Andreas.

Here is the patch to unset tunables and their aliases for --list-tunables test.

OK for master?

Thanks.

-- 
H.J.

[-- Attachment #2: 0001-ld.so-Unset-glibc-tunables-for-list-tunables-test.patch --]
[-- Type: text/x-patch, Size: 915 bytes --]

From 321acb682702dd6ee273207b7ce832f8133abbfa Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 2 Feb 2021 09:31:56 -0800
Subject: [PATCH] ld.so: Unset glibc tunables for --list-tunables test

Unset glibc tunables and their aliases for --list-tunables test.
---
 elf/tst-rtld-list-tunables.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/elf/tst-rtld-list-tunables.sh b/elf/tst-rtld-list-tunables.sh
index e7bbdde949..78f4ed2ebb 100755
--- a/elf/tst-rtld-list-tunables.sh
+++ b/elf/tst-rtld-list-tunables.sh
@@ -26,6 +26,17 @@ run_program_env=$3
 LC_ALL=C
 export LC_ALL
 
+# Unset tunables and their aliases.
+GLIBC_TUNABLES=
+MALLOC_ARENA_MAX=
+MALLOC_ARENA_TEST=
+MALLOC_CHECK_=
+MALLOC_MMAP_MAX_=
+MALLOC_MMAP_THRESHOLD_=
+MALLOC_PERTURB_=
+MALLOC_TOP_PAD_=
+MALLOC_TRIM_THRESHOLD_=
+
 ${test_wrapper_env} \
 ${run_program_env} \
 $rtld --list-tunables \
-- 
2.29.2


  reply	other threads:[~2021-02-02 17:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 15:44 V4 [PATCH 0/2] ld.so: Add --list-tunables to print tunable values H.J. Lu
2020-10-31 15:44 ` V4 [PATCH 1/2] x86: Move x86 processor cache info to cpu_features H.J. Lu
2021-01-14 14:13   ` Adhemerval Zanella
2021-01-14 19:28     ` V5 " H.J. Lu
2020-10-31 15:44 ` V4 [PATCH 2/2] ld.so: Add --list-tunables to print tunable values H.J. Lu
2021-01-14 18:35   ` Adhemerval Zanella
2021-01-14 22:25     ` V5 " H.J. Lu
2021-01-15 12:47       ` Adhemerval Zanella
2021-02-02 10:59       ` Andreas Schwab
2021-02-02 17:36         ` H.J. Lu [this message]
2021-02-02 18:07           ` [PATCH] ld.so: Unset glibc tunables for --list-tunables test Andreas Schwab
2021-02-02 18:12             ` [PATCH] tst-rtld-list-tunables.sh: Unset glibc tunables H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOph540jV_QRn=P6p=RkKmE5hUUMMVWiAAuheJSse18n_A@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).