All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/2] lib: add tst_get_timeout()
Date: Tue, 28 Aug 2018 13:07:50 +0200	[thread overview]
Message-ID: <6680bda80c85d424a5219d9f55dc9c5355dc0da1.1535454204.git.jstancek@redhat.com> (raw)

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 include/tst_test.h | 1 +
 lib/tst_test.c     | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/include/tst_test.h b/include/tst_test.h
index 98dacf3873ab..f801d276d2e5 100644
--- a/include/tst_test.h
+++ b/include/tst_test.h
@@ -217,6 +217,7 @@ const char *tst_strsig(int sig);
  */
 const char *tst_strstatus(int status);
 
+unsigned int tst_get_timeout(void);
 void tst_set_timeout(int timeout);
 
 #ifndef TST_NO_DEFAULT_MAIN
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 2f3d357d2fcc..7bd18205ae7f 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -992,6 +992,11 @@ static void sigint_handler(int sig LTP_ATTRIBUTE_UNUSED)
 	}
 }
 
+unsigned int tst_get_timeout(void)
+{
+	return results->timeout;
+}
+
 void tst_set_timeout(int timeout)
 {
 	char *mul = getenv("LTP_TIMEOUT_MUL");
-- 
1.8.3.1


             reply	other threads:[~2018-08-28 11:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 11:07 Jan Stancek [this message]
2018-08-28 11:07 ` [LTP] [PATCH v2 2/2] move_pages12: end early if runtime gets close to test time Jan Stancek
2018-08-28 12:34 ` [LTP] [PATCH v2 1/2] lib: add tst_get_timeout() Li Wang
2018-08-28 12:58 ` Cyril Hrubis
2018-08-28 14:20   ` Richard Palethorpe
2018-08-28 14:38     ` Jan Stancek
2018-08-29  4:52       ` Li Wang
2018-08-29  7:18         ` Jan Stancek

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=6680bda80c85d424a5219d9f55dc9c5355dc0da1.1535454204.git.jstancek@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.