Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 91924 invoked from network); 3 Aug 2007 22:32:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2007 22:32:27 -0000 Received: (qmail 61293 invoked by uid 500); 3 Aug 2007 22:32:20 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 61270 invoked by uid 500); 3 Aug 2007 22:32:19 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 60702 invoked by uid 99); 3 Aug 2007 22:32:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 15:32:18 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 22:31:57 +0000 Received: from qxvcexch01.ad.quovadx.com ([192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id l73MVqEt012776 for ; Fri, 3 Aug 2007 22:31:52 GMT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: num_get thread safety tests (was: Re: next steps) Date: Fri, 3 Aug 2007 16:30:57 -0600 Message-ID: In-Reply-To: <46B36EB6.9040308@roguewave.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: num_get thread safety tests (was: Re: next steps) Thread-Index: AcfV+SVS9ZEiboCyRCOBUXW+9dpYGAAHG6NA References: <46B34AC8.3060504@roguewave.com> <46B36EB6.9040308@roguewave.com> From: "Travis Vitek" To: X-Virus-Checked: Checked by ClamAV on apache.org =20 >Martin Sebor wrote: > >I suppose that would be okay just so long as it's possible to still >exercise one facet without the other. Which I suspect might defeat >your goal of integrating the testing of both facets into the same >program. > >The problem with creating a dependency between the two facets is >that a bug in one might prevent the other from ever being tested >or might cause false positives in the other, making debugging the >problem more difficult. At the same time, exercising both of the >facets simultaneously would be valuable in its own right so it >would be nice to be able to do both. Okay, I think I'm going to settle for having separate tests for the get and put. I believe this is what you had originally intended, and I hope that is still acceptable. > >An idea that would let us have it both ways is to integrate the >tests for both (all three when you count numpunct) facets into >the same program, still keeping the option of running them >independently of one another, exercising them all at the same >time by default and, when one fails, invoking the program again >and exercising them independently, one after another. This >approach would involve at least two processes: one to drive and >monitor the tests, and another one or more running the tests >themselves. The infrastructure for this approach has already been >put in place: see the rw_process_create() API in the test driver. >Unfortunately, the tests for the API have been failing on a number >of platforms so there are issues with it that remain to be resolved. That is more trouble than I'm wanting to chew on at this time. This seems rather complicated, and since I'm not yet familiar with how the testing infrastructure works, I'm worried that I would end up spending time trying to get this approach to work and not writing tests. > >This approach makes the assumption that the implementations of >the facet specializations for charT* are the same as those for >the streambuf_iterators. This happens to be a safe assumption >to make at the moment but it might change in the future. The >other "issue" with this approach is that the specializations >that are used in the vast majority of cases are those on >the streambuf iterators and not those on pointers. Yes, that is the reason that it didn't appeal to me in the first place. The reason I like it is that it doesn't add a dependency on the streambuf or the streambuf_iterator types. If there is a mt issue in either one of these, then the problem would manifest as a failure in the locale facet test, which just seems odd. I realize that the liklihood of a mt issue existing in either the basic_streambuf or the streambuf_iterator is minimal at the moment but it might change in the future. :) > >So I would suggest to roll your own very simple iterator derived >from streambuf_iterator that operates on a plain character buffer. >There should be examples of how to do this in the test suite, >including the test driver itself (see the header rw_streambuf.h). Yes, I realize that. I was just trying to eliminate as much non-facet related code as I could from the test. Obviously I'm trying so hard as to not be testing the cases that I should be. > >Martin > Travis