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 2/2] pause01: rewrite testcase
Date: Thu, 12 May 2016 11:14:57 +0200	[thread overview]
Message-ID: <20160512091456.GA31561@rei.lan> (raw)
In-Reply-To: <1517175101.1991600.1463044297830.JavaMail.zimbra@redhat.com>

Hi!
> > > -static void go(int sig)
> > > -{
> > > -	(void)sig;
> > > +	/*
> > > +	 * TST_CHECKPOINT_WAIT has built-in timeout, if pause() doesn't return,
> > > +	 * this checkpoint call will reliably end the test.
> > > +	 */
> > > +	TST_CHECKPOINT_WAIT(0);
> > > +	SAFE_WAIT(&status);
> > 
> > Hmm, maybe it would be better if we add timeout logic to the new test
> > library instead of adding it to selected few testcases.
> 
> I pushed it with all your suggestions, except for the timeout logic.
> 
> Did you have something specific in mind how to implement this?
> My first thought was a new field to tst_test struct, and forking
> a watchdog process.

I was thinking of forking watchdog process for every test since you
cannot really tell which testcases will block. Then have defined default
timeout in the test library with possible override in the tst_test
structure. But perhaps this is too heavy approach, I will have to
measure how much will this slow down the test execution.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-05-12  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 12:03 [LTP] [PATCH 1/2] checkpoints: avoid unnecesasry sleep in checkpoint_wake Jan Stancek
2016-05-11 12:03 ` [LTP] [PATCH 2/2] pause01: rewrite testcase Jan Stancek
2016-05-11 13:21   ` Cyril Hrubis
2016-05-12  9:11     ` Jan Stancek
2016-05-12  9:14       ` Cyril Hrubis [this message]
2016-05-11 12:23 ` [LTP] [PATCH 1/2] checkpoints: avoid unnecesasry sleep in checkpoint_wake 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=20160512091456.GA31561@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