Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 98294 invoked from network); 27 Feb 2007 23:11:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2007 23:11:39 -0000 Received: (qmail 7804 invoked by uid 500); 27 Feb 2007 23:11:48 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 7781 invoked by uid 500); 27 Feb 2007 23:11:48 -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 7747 invoked by uid 99); 27 Feb 2007 23:11:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Feb 2007 15:11:48 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.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; Tue, 27 Feb 2007 15:11:36 -0800 Received: from [10.70.3.48] ([10.70.3.48]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id l1RNBCxO007296 for ; Tue, 27 Feb 2007 23:11:13 GMT Message-ID: <45E4BA90.5090602@roguewave.com> Date: Tue, 27 Feb 2007 16:11:12 -0700 From: Andrew Black User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: --compat mode behavior issues Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Greetings all. One of my recent projects has been working on modifications to some of the internal build processes related to standard library. One of these modifications has been to include the building of certain 'legacy' tests as part of the stdcxx nightly build process. These tests rely on a framework internal to RogueWave, and aren't included in the subversion tree. An ongoing project has been porting these tests to the stdcxx test driver, but there are something around 100 of these tests left to be ported. These tests are the reason for the existence of the --compat switch in the rwtest library and the exec utility. The purpose is to allow us to run the stdcxx test suite within the RogueWave internal infrastructure, and the legacy tests within the makefile infrastructure. When the rwtest library is in compatibility mode, it allows users to specify an additional small set of switches on the command line. Most of these switches are placeholders, but the -O switch allows redirection of output to an arbitrary file. At this time, there is an important behavior difference between the legacy tests and the rwtest library. With the rwtest library, all output is routed to stderr/stdout. However, with the legacy tests, the output is routed by default to the .out file which the exec utility redirects the output to. Unfortunately, this dual usage of the file seems to result in a clearing/clobbering of the output file, resulting in a loss of results and a FORMAT status message. For these tests to be useful, we need to resolve this problem. One (faulty) option would be to use the -O switch in compatability mode, and provide it with a file such as /dev/stdout or /dev/fd/1. On systems where these 'magic' files exist, they reference the standard out file descriptor. However, the existence of such a file can't be relied on, so we can't use them. A similar magic file is /dev/tty, which is a file descriptor pointing at the active console. For the child process from the exec utility, there is no associated console, so there is no place to route the output, leading to a failure. A second method would be to alter the behavior of the test driver in --compat mode to write to the .out file, and alter the exec utility to redirect stderr and stdout to /dev/null in --compat mode. A final method would be to alter the rwtest library to treat the file name of '-' when passed to the -O option as stdout, and make a similar change to the RogueWave internal framework, then run the executables with the options '--compat -O -'. This would likely be less invasive than the other option, and could be considered a useful enhancement. What thoughts do other people have on this? --Andrew Black