From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91529 invoked by alias); 3 Aug 2015 15:16:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 91446 invoked by uid 89); 3 Aug 2015 15:16:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 03 Aug 2015 15:16:22 +0000 Received: from EUSAAHC007.ericsson.se (Unknown_Domain [147.117.188.93]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id 93.94.00712.81D1FB55; Mon, 3 Aug 2015 09:49:45 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.95) with Microsoft SMTP Server id 14.3.210.2; Mon, 3 Aug 2015 11:16:12 -0400 Message-ID: <55BF85BC.8040102@ericsson.com> Date: Mon, 03 Aug 2015 15:16:00 -0000 From: Simon Marchi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Pedro Alves , Subject: Re: [PATCH] Remove symlinks created in argv0-symlink.exp and general cleanup References: <1438287227-11303-1-git-send-email-simon.marchi@ericsson.com> <55BF7962.3060106@redhat.com> In-Reply-To: <55BF7962.3060106@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00025.txt.bz2 On 15-08-03 10:23 AM, Pedro Alves wrote: > 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 Right. >> - 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.) It makes sense. The problem is that it also affects when running other tests. For example, doing a $ make check RUNTESTFLAGS="argv0-symlink.exp" and then $ make check RUNTESTFLAGS="whatis.exp" gives http://paste.ubuntu.com/11993577/ At least, it's possible to avoid it by doing $ make check RUNTESTFLAGS="gdb.base/whatis.exp" instead. However, it also affect those as well: $ make check $ make check RUNTESTFLAGS="--directory=gdb.base" runtest will find all tests recursively, resulting in this: http://paste.ubuntu.com/11993659/ Building out-of-tree would avoid this altogether, of course. The reason I build in-tree is that I use a script [1] to regression-test my patches. The script is a bit dumb and requires to build in the git repo. I think I'll improve it a bit to make it possible to build OOT. Simon [1] https://github.com/simark/gdb-check