public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: Mark Wielaard <mark@klomp.org>
Cc: alexandra.khirnova@gmail.com, libc-alpha@sourceware.org,
	ahajkova@redhat.com
Subject: Re: [PATCH] Add valgrind smoke test
Date: Fri, 10 Dec 2021 14:15:21 -0500	[thread overview]
Message-ID: <xnpmq4ff06.fsf@greed.delorie.com> (raw)
In-Reply-To: <a7d212646a510ad690e5c7f9a865a08dc2ef2e33.camel@klomp.org>

Mark Wielaard <mark@klomp.org> writes:
>> I.e. (in short):
>> 
>> ${...} /bin/sh valgrind foo  <- runs /bin/sh with new glibc
>> /bin/sh ${...} valgrind foo  <- runs valgrind with new glibc
>> /bin/sh valgrind ${...} foo  <- runs foo with new glibc
>
> The intent is to test the valgrind available in the test environment
> against the just-built glibc (that is both valgrind and the test binary
> valgrind-test, which are really the same process)

More like a mix:

/bin/sh ${...} valgrind ${...} foo

The ${...} is all the variables needed to run in the just-built
environment, so ${test_wrapper_env} ${run_program_env} $rtld
--library-path "$library_path"

You need to include all that muck for each binary you want to run in the
just-built environment; it's not inherited.

Although you likely don't want the test_wrapper_env for the "foo" as it
might include a nested ssh, it's complicated and requires a bit of trial
and error.  You definitely need the rest else the test program will use
the target's system libc.

>> (in general, testing in a cross-compiled case is an excellent way to
>> see
>> if you got the rtld stuff in the right place ;-)
>
> I never did a cross-compiled case. Is there a description of that
> process?

You can use build-many-glibcs to do a cross build but I don't know if
that supports running the testsuite fully.

Typically you'd have a remote machine you can ssh to, which nfs mounts
your build to the same path, then set a variable to wrap all the tests
in a script that ssh's.

https://sourceware.org/glibc/wiki/Testing/Testsuite#Testing_with_a_cross-compiler

Look at glibc's scripts/cross-test-ssh.sh for instructions

> See also my other comment in 
> https://sourceware.org/pipermail/libc-alpha/2021-December/133714.html
>
> This tests not just a simple malloc/free pair, but also various
> string/path comparisons, dlopen, etc. which in the past have seen
> issues with valgrind.

Ok.


  parent reply	other threads:[~2021-12-10 19:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 14:40 Alexandra Hájková
2021-12-07 11:56 ` Mark Wielaard
2021-12-07 20:32 ` DJ Delorie
2021-12-07 20:58   ` Florian Weimer
2021-12-07 21:10     ` DJ Delorie
2021-12-10 12:56   ` Mark Wielaard
2021-12-10 13:07     ` Florian Weimer
2021-12-10 19:15     ` DJ Delorie [this message]
2021-12-13 12:55       ` Mark Wielaard
2021-12-17 18:26 ` Alexandra Hájková
2021-12-17 21:07   ` DJ Delorie
2021-12-20 11:31     ` Alexandra Petlanova Hajkova
2021-12-20 11:37 ` Alexandra Hájková
2022-01-10 12:13   ` Mark Wielaard
2022-01-10 12:38   ` Adhemerval Zanella
2022-01-12 17:15 ` Alexandra Hájková
2022-01-20 19:35   ` Alexandra Hájková
2022-01-24 18:34     ` Joseph Myers
2022-01-26 17:46       ` Joseph Myers
2022-01-26 17:59       ` Mark Wielaard
2022-01-26 18:40         ` Joseph Myers
2022-01-26 19:23           ` Mark Wielaard
2022-01-20 21:29   ` DJ Delorie
  -- strict thread matches above, loose matches on Subject: below --
2021-05-24 12:15 Alexandra Hájková
2021-05-24 14:28 ` Carlos O'Donell
2021-05-24 19:28   ` Joseph Myers
2021-06-28  8:29     ` Florian Weimer
2021-06-28 18:33       ` Joseph Myers

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=xnpmq4ff06.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=ahajkova@redhat.com \
    --cc=alexandra.khirnova@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=mark@klomp.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).