From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2827 invoked by alias); 12 Oct 2007 22:54:48 -0000 Received: (qmail 2807 invoked by uid 22791); 12 Oct 2007 22:54:42 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 12 Oct 2007 22:54:40 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id l9CMsca6002578 for ; Fri, 12 Oct 2007 18:54:38 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l9CMsc5p021534 for ; Fri, 12 Oct 2007 18:54:38 -0400 Received: from [127.0.0.1] (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l9CMsbn0028291; Fri, 12 Oct 2007 18:54:37 -0400 Message-ID: <470FFAC8.1050909@redhat.com> Date: Fri, 12 Oct 2007 22:54:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Stan Cox CC: Frysk List Subject: Re: generating type tests References: <1192223570.2947.145.camel@multics.rdu.redhat.com> In-Reply-To: <1192223570.2947.145.camel@multics.rdu.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00046.txt.bz2 My hunch it is trying to do too much - simultaneously acting as both filter and generator. For instance: -> structs is created from a brute force table -> scalars is generated using a for loop would it be better to separate these steps out, perhaps also having a separate data file, then this can be implemented as one or more filters. As things advance, will the types that need to be tested become too complex for this scripting technique? For instance: struct foo { int i; } f = { 1 }; struct bar { struct foo* f; struct bar *b;}; struct bar b = { NULL, NULL } struct bar bp = { &f, &b }; I wonder if letting the user describe the types in C, and output in comments, and then filter that to generate the tests is better? Vis: // TEST: bp // TYPE: struct bar { struct foo *f; struct bar *b} // VALUE: { 0x.*, 0x.* } // STYPE: struct bar is going to be easier to work on. Similarly, chosing simple values may make it easier. Andrew