mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Re: Daily reports: Wednesday
Date: Thu, 7 Jul 2011 18:18:32 +0200	[thread overview]
Message-ID: <20110707161832.GQ27634@port70.net> (raw)
In-Reply-To: <4E14C55E.6030808@gmail.com>

* Luka Mar??eti?? <paxcoder@gmail.com> [2011-07-06 22:28:14 +0200]:
> As for the future, I'm planing on making the cluts.c framework, and
> this is what I intend for it to do:
> 
> * find 'test collections' using dirent.h (haven't used it yet, but
> shouldn't be hard to learn I guess)
> * fork off for each test collection and execl() each one
> * simple statistics based on the status provided by wait()
> 

my opinion:

don't overengineer the test system

(i have ideas about it, i think i'll
implement them soon, but i'll be
offline for a week)

as a first round it's enough to
make it work from a makefile/shell script
(ie. writing a testsuit tool in c with
flags etc is not that important)

a simple solution is:
test collections are .c files in directories
each directory makes one executable
(several test_foo.c with some exported test_foo
functions and one main, the main can be even
generated if test_* convention is used but at first
hand writing it is probably simpler)
there is a shell script/makefile in the root that
builds and runs the tests in all directory
and gives a report at the end about the number
of failures

simplicity is important so that it is
easy to contribute tests or fix the system
later when there are more tests

extra features can come later:
> * advanced statistics(via what will be common/ipc.c): shared memory
> with two integers for each 'test collection' which will indicate:
>     a) number of tests that have begun executing (incremented before
> each test starts by the child)
>     b) number of successful tests
>     The pointer to shared memory will be passed as an argument to
> the child (test collection). From a) the framework will be able to
> know which test number has crashed the collection. If the collection
> returns, the framework will be able to calculate the success rate by
> dividing b) with a).
> * a few features which the user can invoke via some switches (using
> standard tokenizing functions - need to study them first):
>     -v --verbose without which collections will not print anything
> themselves
>     -t --test <test1>[,<test2>,...]  specific tests to execute
>     -x --exclude <test1>[,<test2>,...] exceptionally excluded tests
>     -h --help etc
> 
at some point (but probably not right now) it would
be nice if slow tests can be marked with some
macro oslt, by the test writer and it should be easy
to avoid those

i'm not sure about -t and -x
if long and descriptive testnames are used then a
regex filter is probably easier to use than -t -x
(but we don't know this yet so it should be decided
when there are many tests ready)

> Comments and suggestions are very welcome. Especially any advice
> about includes and .h files is welcome, I am new to structuring
> files in C.
if you are new to it then i really recommend to do
the absolute simplest/minimal thing you can imagine here,
then it will be easy to fix later..

of course ymmv


  reply	other threads:[~2011-07-07 16:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  0:41 Daily reports: Monday Luka Marčetić
2011-07-05 14:24 ` Daily reports: Tuesday Luka Marčetić
2011-07-06 20:28   ` Daily reports: Wednesday Luka Marčetić
2011-07-07 16:18     ` Szabolcs Nagy [this message]
2011-07-07 20:27       ` Luka Marčetić
2011-07-07 20:16     ` Daily reports: Thursday Luka Marčetić
2011-07-08 22:41       ` Daily reports: Friday Luka Marčetić
2011-07-09  1:12         ` Daily reports: Friday - cont Luka Marčetić
2011-07-09  1:38           ` Solar Designer
2011-07-09 11:53         ` Daily reports: Friday Solar Designer
2011-07-09 15:30           ` Luka Marčetić
2011-07-09 22:11             ` Luka Marčetić
2011-07-13 19:46             ` Solar Designer
2011-07-10 14:52           ` Daily reports: Friday (threaded setuid testing) Rich Felker
2011-07-11 22:59             ` Daily cluts reports Luka Marčetić
2011-07-14  9:57               ` cluts: strerror_r() test (was: Daily cluts reports) Solar Designer
2011-07-14 10:41                 ` cluts: strerror_r() test Luka Marčetić
2011-07-14 10:47                   ` Solar Designer
2011-07-14 17:55                   ` Rich Felker
2011-07-14 19:35                     ` Luka Marčetić
2011-07-15  0:09               ` Daily cluts reports Luka Marčetić
2011-07-15 22:47                 ` Daily cluts reports - numeric, setuid, and mid-term evaluation Luka Marčetić
2011-07-15 23:51                   ` Rich Felker
2011-07-17  0:37                   ` Daily cluts reports - setuid reiteration Luka Marčetić

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110707161832.GQ27634@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).