From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13817 invoked by alias); 18 Dec 2002 00:08:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13784 invoked from network); 18 Dec 2002 00:08:14 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by 209.249.29.67 with SMTP; 18 Dec 2002 00:08:14 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id gBI081619389; Tue, 17 Dec 2002 16:08:01 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, Michael Elizabeth Chastain Subject: Re: [patch] delete namespace __gnu_test from C++ testsuite References: <20021217233500.GA26182@nevyn.them.org> From: David Carlton Date: Wed, 18 Dec 2002 03:11:00 -0000 In-Reply-To: <20021217233500.GA26182@nevyn.them.org> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00531.txt.bz2 On Tue, 17 Dec 2002 18:35:00 -0500, Daniel Jacobowitz said: > On Tue, Dec 17, 2002 at 03:28:17PM -0800, David Carlton wrote: >> I've committed the following patches to delete the namespace >> __gnu_test from the C++ testsuite files in which it occurs: it's >> pointless, illegally-named, and turns those files into tests of >> namespace support as well as tests of whatever they're trying to >> test. > I hardly agree. These tests were taken from libstdc++ or the > libstdc++ testsuite, weren't they? They have to work with the > namespace. Geez - you were the one who complained about that namespace when I originally made the patch that created m-static1.cc. :-) Anyways: I don't know where they were taken from: there's no indication in the files or the ChangeLogs that they were taken from anywhere else. They may be taken from libstdc++, but they certainly don't depend on libstdc++: the tests are in standard C++, and most of the tests don't involve the library at all. > I'd rather you added simpler versions rather than changing what an > existing test is testing. That messes up test results history in > general. Removing the namespace doesn't change what gdb.sum looks like at all. If I were to add simpler versions, they would change the current file namespace __gnu_test { } main () { using namespace __gnu_test; } to namespace __gnu_test { } main () { using namespace __gnu_test; } (Plus similar changes for the .exp file.) I don't see what the point of that is. Basically, I don't like tests that test multiple concepts at once, as a general policy: if you have a test testing A and B then, when it fails, you only know that you screwed up A or B, but not which. (Exactly such a situation is what prompted me to remove these namespaces: I'm not doing it for theoretical reasons, but because it's already caused a practical problem for me once.) When concepts A and B interact in nontrivial ways, then you should ideally have tests for A, B, and A+B: and, indeed, m-data.cc, say, has tests for data members that don't involve templates as well as data members that do involve templates. But it previously didn't have any tests that involved data members but that didn't involve namespaces; that's bad. After the patch, it doesn't have tests that involve both data members and namespaces; that's also bad, but it's not as bad, and namespace.exp goes a long way towards covering that gap. Admittedly, namespaces are orthogonal enough to other C++ language issues that we may eventually want all or almost all of the C++ testsuite files to include namespace tests as well. But, in the mean time, I'd rather have focused tests rather than vague tests. David Carlton carlton@math.stanford.edu