From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] Test library API changes
Date: Thu, 18 Feb 2016 11:40:02 +0100 [thread overview]
Message-ID: <20160218104002.GA19157@rei.lan> (raw)
In-Reply-To: <56C58B81.3080006@oracle.com>
Hi!
> > I haven't removed it yet... I'm still thinking how we can generate
> > things like TAP output that expects us to print exact number of tests on
> > the first line followed by exact number of result lines and make as
> > little rules for result reporting as possible.
> >
> > Maybe we can just say that testcases that define test_all do one just
> > one test and produce one result per such test and do more detailed
> > reporting only for testcases that define tcnt.
> >
> > Or we can turn on the detailed reporting only if acnt has been set.
>
> Not sure, but if I read TAP spec correctly, it doesn't strictly define
> that it should beon the first line, rather appear only once at the start
> or at the end (if the number of test points is not known).
I missed this part. I guess that we can always generate the number of
tests after the test was run and even when the number of tests is needed
in the result log beforehand we can just write the whole log once the
test finishes.
Explicit number of tests defined beforhand has only one advantage. We
would be able to detect a cases where the test has exited cleanly before
the test has really finished.
> So if tcnt for the test plan, what is 'acnt' for? ... I didn't find the
> analogy in the TAP spec.
Technically now the tcnt defines number of tests implemented by the
test() function. The acnt was meant as number of assertions but is
unused at the moment.
I.e. if test() function prints two PASS/FAIL statements during a call
acnt would have been set to 2 and the total number of PASS/FAIL messages
would be tcnt * acnt. But Jan thinks that this would be unnecessarily
strict requirement.
> Looking at the 'struct tst_test',
>
> * the names like 'tcnt' and 'acnt' seem not clear. May be we should name
> 'tcnt' as
> test_planor test_count?
This is definitly something that hasn't been finished yet...
> * also, why bitfields in the struct tst_test have different number of
> storage bits?
>
> int needs_tmpdir:1;
> int needs_root:2;
> int forks_child:3;
> int needs_device:4;
> int needs_checkpoints:5;
>
> if their value is just '0' or '1', ':1' - should be instead.
Good catch. This is silly mistake of mine.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2016-02-18 10:40 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 11:11 [LTP] Test library API changes Cyril Hrubis
2016-01-07 13:01 ` Jan Stancek
2016-01-07 13:27 ` Cyril Hrubis
2016-02-04 10:56 ` Cyril Hrubis
2016-02-08 18:02 ` Cyril Hrubis
2016-02-09 16:43 ` Cyril Hrubis
2016-02-09 16:57 ` Cyril Hrubis
2016-02-09 17:46 ` Cyril Hrubis
2016-02-10 10:42 ` Jan Stancek
2016-02-10 10:56 ` Cyril Hrubis
2016-02-10 11:41 ` Cyril Hrubis
2016-02-11 16:03 ` Cyril Hrubis
2016-02-12 12:33 ` Jan Stancek
2016-02-12 17:53 ` Cyril Hrubis
2016-02-16 21:19 ` Cyril Hrubis
2016-02-17 14:39 ` Jan Stancek
2016-02-17 15:54 ` Cyril Hrubis
2016-02-18 9:05 ` Jan Stancek
2016-02-18 11:07 ` Cyril Hrubis
2016-02-18 11:26 ` Jan Stancek
2016-02-18 11:53 ` Cyril Hrubis
2016-03-02 14:44 ` Cyril Hrubis
2016-03-03 13:13 ` Jan Stancek
2016-03-03 14:00 ` Cyril Hrubis
2016-03-10 16:57 ` Cyril Hrubis
2016-03-11 13:57 ` Jan Stancek
2016-03-14 12:51 ` Cyril Hrubis
2016-03-14 16:00 ` Cyril Hrubis
2016-03-15 8:58 ` Jan Stancek
2016-03-15 9:22 ` Cyril Hrubis
2016-03-17 16:06 ` Cyril Hrubis
2016-03-18 9:44 ` Jan Stancek
2016-03-31 10:01 ` Cyril Hrubis
2016-04-01 14:45 ` Jan Stancek
2016-04-04 12:04 ` Cyril Hrubis
2016-04-04 14:12 ` Jan Stancek
2016-04-05 14:16 ` Cyril Hrubis
2016-04-05 15:06 ` Jan Stancek
2016-04-06 10:37 ` Cyril Hrubis
2016-03-14 16:40 ` Cyril Hrubis
2016-02-18 9:14 ` Alexey Kodanev
2016-02-18 10:40 ` Cyril Hrubis [this message]
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=20160218104002.GA19157@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox