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: Tue, 5 Jan 2016 12:11:36 +0100	[thread overview]
Message-ID: <20160105111136.GA32659@rei.lan> (raw)

Hi!
I'm back after my vacation and I had a some time to experiment with the
LTP test API. My intention is to make the changes in the next
development cycle. I.e. we will concentrate on the release in upcoming
weeks and once that is taken care of I would like to discuss these
changes.

I've pushed one cleanup that removes tst_res() and tst_brk() from the
codebase today since there was only one test using this interface and
that was a typo anyway.

Two patches that actually implement sketch of the new API are in forked
LTP repository at:

https://github.com/metan-ucw/ltp

The interesting files are:

https://github.com/metan-ucw/ltp/blob/master/include/tst_test.h
and
https://github.com/metan-ucw/ltp/blob/master/lib/tst_test.c
and one testcase that has been converted to the new library:
https://github.com/metan-ucw/ltp/blob/master/testcases/kernel/syscalls/preadv/preadv01.c

The general intention is to move as much code to the library as possible
in order to avoid common mistakes and also to let the programmer
concentrate on the test itself rather than spending time figuring out
the test library API.

One of the important changes is that the library functionality is
exported as bitflags in the test structure rather than function calls,
this makes the library much easier to use since this eliminates all
problems with ordering of the resource inits/cleanups.

Another big change is that the process no longer runs the test function
itself but rather than that export pointer to the function that runs the
test. This would allow us to finally fix problems with test timeouts
etc. since we can easily fork in the test library before we start
execution the test code and watch for segfaults/timeouts etc.

The code I've wrote just a proof of concept and by no means complete.
It's intended to start a conversation (I can send it as a patch here as
well if desired, but I do not think that it makes sense for so early
prototype).

-- 
Cyril Hrubis
chrubis@suse.cz

             reply	other threads:[~2016-01-05 11:11 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 11:11 Cyril Hrubis [this message]
2016-01-07 13:01 ` [LTP] Test library API changes 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

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=20160105111136.GA32659@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