From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/226 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?THVrYSBNYXLEjWV0acSH?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts weekly reports Date: Wed, 03 Aug 2011 19:08:34 +0200 Message-ID: <4E398092.8070907@gmail.com> References: <20110803005619.GA2378@openwall.com> <20110803012112.GT132@brightrain.aerifal.cx> <4E3949E3.4090008@gmail.com> <20110803133155.GV132@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1312391440 12109 80.91.229.12 (3 Aug 2011 17:10:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2011 17:10:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-310-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 03 19:10:36 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qoexo-00022K-4j for gllmg-musl@lo.gmane.org; Wed, 03 Aug 2011 19:10:36 +0200 Original-Received: (qmail 1728 invoked by uid 550); 3 Aug 2011 17:10:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 1719 invoked from network); 3 Aug 2011 17:10:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ep9Rz/xSQGhlXtPj9l0ji+9z0jAZiJ2FXhKlBSBbcc8=; b=CkNfqfs0wpBk6rUxWZK7Ob0KSZxCgh5izAWckuQ4Sz1p+zjwlpawxqdFYu0eDRnRJN hiUKvnrcwgy1AisO+JSW5rb5pFkY0azMT17bde3217m7HnQIRoOrbXd5qR4orx97heRC sgs/outVtUzHeXxaXCZOQqXnieiYYX3vyNKTw= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 In-Reply-To: <20110803133155.GV132@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:226 Archived-At: On 08/03/2011 03:31 PM, Rich Felker wrote: > On Wed, Aug 03, 2011 at 03:15:15PM +0200, Luka Marčetić wrote: > Well the question is whether the intended usage, for someone adding > tests, is to add them by hand or by going back to the json "source" > file, adding them there, and rebuilding using the Python tool. In this > case cluts doesn't depend on Python to *run* the tests, but it does > depend on it to modify or update the tests. It doesn't, seeing as they can be written by hand. There's nothing stopping one from modifying C directly. The only problem here is the discrepancy between json and C, but that doesn't imply python dependency. In fact it is assumed that C code would need to be modified sometimes. In such cases, one can generate a single new test with the generator, and paste the code into the C source file. > I'm still confused why > this can't be done in plain C, with the test parameters in C > structures that you loop over, much like some of the existing tests > (e.g. numeric). It's just a lot of work. The biggest problem C has when applied in writing unit tests is its inability to use function pointers with arbitrary number of arguments, and the fact that there's no (dynamic?) type casting - eg there's no way to pass varying type arguments to say printf with a correct fmt; once a float, once an int. Those two make for a load of syntax that like anything but sugar. That's what I'm trying to generate, instead of having to type it all. Luka