From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/223 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts weekly reports Date: Wed, 3 Aug 2011 18:51:48 +0400 Message-ID: <20110803145148.GA3618@openwall.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=us-ascii X-Trace: dough.gmane.org 1312383117 19044 80.91.229.12 (3 Aug 2011 14:51:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2011 14:51:57 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-307-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 03 16:51:53 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 1QocnY-0002Zm-Qy for gllmg-musl@lo.gmane.org; Wed, 03 Aug 2011 16:51:52 +0200 Original-Received: (qmail 22255 invoked by uid 550); 3 Aug 2011 14:51:52 -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 22247 invoked from network); 3 Aug 2011 14:51:52 -0000 Content-Disposition: inline In-Reply-To: <20110803133155.GV132@brightrain.aerifal.cx> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:223 Archived-At: Luka, Rich - On Wed, Aug 03, 2011 at 03:15:15PM +0200, Luka Mar??eti?? wrote: > Well it's a bit too late to stop now, but I don't think fear is > warranted: Cluts doesn't depend on python because a code generator > is written in it. The generated code is regular C code, which could > be written by hand if one wanted to. A code generator is not a > preprocessor, it is just a handy tool to automate the process of > writing code by hand. My generator takes in a .json file, and out > generates most of the syntactic sugar, loops etc needed for the test > collection to compile and run. That is to say, the generator is used > to write the tests, not to run them. The syntactic sugar could either be produced with cpp macros (see Rich's libc-testsuite) or avoided at all (see the str.c sample I posted in June, where the arg_next() approach avoids having to use nested loops at C source level while achieving the same effect as nested loops would). Or you could use a reasonable mix of these two. On Wed, Aug 03, 2011 at 09:31:55AM -0400, Rich Felker 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. 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). Right. Anyway, now that Luka went with the Python approach already, I think it makes sense for Rich to take a look a this stuff and discuss it with Luka before deciding on what to do next. I'll have to stay out of this, focusing on other projects. Thanks, Alexander