public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] Test library API changes
Date: Thu, 7 Jan 2016 14:27:49 +0100	[thread overview]
Message-ID: <20160107132748.GA13423@rei.lan> (raw)
In-Reply-To: <1146864418.5284131.1452171696007.JavaMail.zimbra@redhat.com>

Hi!
> 1) https://github.com/metan-ucw/ltp/blob/master/include/tst_test.h#L65
> I did like there is option for test_all(). One concern I had was
> that forcing everybody to use test(int) was too restrictive.
> For example, you want to pass more parameters than just testcase #.
> Also not all tests follow "static struct tcase {" idiom, with single
> test function that is fed different arguments. I think test_all()
> gives us more flexibility. I was also thinking if library should
> care about "tcnt".

My primary concern for adding the test_all() was a bit different. There
are testcases where tests depends on each other and must be executed in
exact order. So instead of adding overly complicated way how to express
the dependencies I've added a possibility to run all tests in one
function. But yes the concern that enforcing too strict format may
complicate the conversion of the testcases was there as well.

> 2) https://github.com/metan-ucw/ltp/blob/master/lib/tst_test.c#L218-L219
> This also looks more strict requirement than what we had until now.
> It requires to count exactly how many PASS/FAIL there are.
> Is extra PASS or SKIP message a reason to fail the test with brk?

That depends. If we want to produce more structured/detailed logs than
PASS/FAIL/SKIP for one test binary we should be more strict about this.
Since at the moment single skipped testcase marks the whole test as
skipped. I would like to get to the state where the test result rather
says: "9 passed 1 skipped".

> 3) cleanup and children
> I know, it's a proof of concept :-).

I wasn't looking into thread safety either. So far it's just a sketch of
API + very minimal implementation.

> 4) After first reading, I'm not sure I have clear picture of changes in API.
> From what I gathered these are main changes:
>   test.h -> tst_test.h
>   tst_resm -> tst_res
>   tst_brkm -> tst_brk
>   safe_macros.h -> tst_safe_macros.h (now included via tst_test.h)

I've tried to do the changes in a way that old and new library can
coexist for some time, since I guess that the conversion would take
quite a lot of time. That is the main reason for the tst_resm -> tst_res
change. The safe_macros header was split into two, the new one does not
take the cleanup parameter and calls the same functions (as the old one)
but with with NULL passed a the callback. What wasn't done yet is
rerouting tst_resm()/tst_brkm() to the new library in case that new
library is used so that rest of the code in lib/ can be called from the
new library.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-01-07 13:27 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 [this message]
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

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=20160107132748.GA13423@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