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] [PATCH] fanotify: Add test for permission event destruction
Date: Tue, 24 Jan 2017 14:00:26 +0100	[thread overview]
Message-ID: <20170124130025.GA29054@rei.lan> (raw)
In-Reply-To: <20170124121344.GD20153@quack2.suse.cz>

Hi!
> > Just FYI we have switched to a new test library for all new testcases
> > quite some time ago, you can have a look at the documentation on our
> > wiki[1], or look at a comparsion of the same test I've prepared for a
> > lwn.net article[2].
> 
> Ah, I didn't notice. Honestly, I've just copied some older fanotify test
> and modified it ;).

I assumed, we are slowly converting old testcases, but given the number
of old tests the old library and new library will coexist alongside for
a few years.

> > I can convert the test if you want, it's not complicated, but please
> > keep in mind to use the new library API next time you start writing a
> > testcase.
> 
> One thing that is not quite clear to me with the new API:
> 
> Should I use .test or .test_all callback? The test has two parts => we call
> tst_resm() twice. That would indicate I should set .tcnt to 2 and use .test
> callback however that is seriously impractical as the two tests are very
> closely related and in fact the second test just verifies that the cleanup
> of the first test went fine. So we need to propagate a lot of state between
> the first and the second state.

The conditioins are quite relaxed in the new library. The test_all
function or each iteration test function has to report some results,
anything else is up to you.

We have quite a number of testcases where each step depends on previous
one and because of that everyting is executed in a sequence in the
test_all() function which in turn produces several TPASS messages. For
instance the fallocate testcases that insert and then remove blocks in a
middle of a file.

-- 
Cyril Hrubis
chrubis@suse.cz

      reply	other threads:[~2017-01-24 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 13:29 [LTP] [PATCH] fanotify: Add test for permission event destruction Jan Kara
2017-01-21 15:47 ` Amir Goldstein
2017-01-23 11:07   ` Jan Kara
2017-01-23 12:19 ` Cyril Hrubis
2017-01-24 12:13   ` Jan Kara
2017-01-24 13:00     ` 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=20170124130025.GA29054@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