This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove symlinks created in argv0-symlink.exp and general cleanup
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Mon, 03 Aug 2015 15:23:30 +0100
- Subject: Re: [PATCH] Remove symlinks created in argv0-symlink.exp and general cleanup
- Authentication-results: sourceware.org; auth=none
- References: <1438287227-11303-1-git-send-email-simon dot marchi at ericsson dot com>
On 07/30/2015 09:13 PM, Simon Marchi wrote:
> When running argv0-symlink.exp, symlinks are left in the test output
> directory. One of them is a recursive symlink. This causes the same tests
> to be found multiple times and disturbs subsequent test runs.
>
> To witness it simply, just run
>
> $ make check RUNTESTFLAGS="argv0-symlink.exp"
>
> twice in a row. The second run will find and run argv0-symlink.exp
> multiple times because of the recursive symlink left by the first run. Note
> that this only happens when building in tree. The simple fix is to
> remove the links when we are done.
>
> At the same time, I did a general cleanup of the test:
>
> - Add and use a create_link proc.
> - Bail out early if target does not support argv[0].
What's the rationale for that? It seems that'd skip the
tests that ensure that "info inferiors" shows the $filelink; those
aren't currently guarded by $has_argv. AFAICS, that was done
on purpose. See:
git show 673dc4a0
git show 673dc4a0:gdb/testsuite/gdb.base/argv0-symlink.exp
> - Of course, remove created symlinks before returning.
I think you should leave them, actually. That's a general direction
we've been following -- leaving build/test artifacts in place in case
the test fails and we need to debug what happened.
So instead what we do is remove any leftover from a previous run
that could interfere, when we start a new run. (I think the patch
is already doing that too.)
Thanks,
Pedro Alves