All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH 1/2] tst_test: Add test multiplex function
Date: Wed, 6 Mar 2019 12:35:44 -0500 (EST)	[thread overview]
Message-ID: <815826896.5712903.1551893744593.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20190306170008.GE12479@rei>



----- Original Message -----
> Hi!
> > on first look this looks like a workaround, because we have locked
> > ourselves out of .test function for timer tests.
> 
> I do not follow you here, can you elaborate?

If this wasn't timer test, I'd ask why don't we use existing .test and .tcnt,
your test() func can be called with a parameter, so you could change
the code to choose correct syscall/glibc func based on value of that parameter.

For normal tests, this looks almost and .test/.tcnt functionality,
except test count can be also dynamic.

static int tcase = -1;

static void test(void)
{
   switch (tcase) {
   }
}

static int select_mpx(void)
{
    tcase++;
    if (tcase == 5)
      return 0;
    return 1;
}

static struct tst_test test = {
    .test_multiplex = select_mpx,
    .test_all = test,
}

> 
> This patch has nothing to do with timer tests, it just allows whatever
> the test does to be done several times with a hook to change some
> settings prior to each iteration.
> 
> --
> Cyril Hrubis
> chrubis@suse.cz
> 

  reply	other threads:[~2019-03-06 17:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 15:24 [LTP] [RFC PATCH 1/2] tst_test: Add test multiplex function Cyril Hrubis
2019-03-06 15:24 ` [LTP] [RFC PATCH 2/2] syscalls/select04: Test four syscall variants Cyril Hrubis
2019-03-06 16:42   ` Mark Salyzyn
2019-03-06 16:53 ` [LTP] [RFC PATCH 1/2] tst_test: Add test multiplex function Jan Stancek
2019-03-06 17:00   ` Cyril Hrubis
2019-03-06 17:35     ` Jan Stancek [this message]
2019-03-06 18:28       ` Cyril Hrubis
2019-03-06 19:20         ` Jan Stancek
2019-03-07 12:29           ` Cyril Hrubis
2019-03-06 20:58 ` Steve Muckle
  -- strict thread matches above, loose matches on Subject: below --
2019-03-06 15:21 Cyril Hrubis
2019-03-06 15:23 ` 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=815826896.5712903.1551893744593.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.