All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: DAN LI <li.dan@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH]syscalls/adjtimex01.c: Test for mode ADJ_OFFSET_SINGLESHOT
Date: Mon, 22 Apr 2013 10:15:38 +0800	[thread overview]
Message-ID: <51749D4A.9030305@cn.fujitsu.com> (raw)
In-Reply-To: <5170BBCE.3090503@cn.fujitsu.com>

On 04/19/2013 11:36 AM, DAN LI wrote:
> 
> Additional test for mode ADJ_OFFSET_SINGLESHOT.
> 
> Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>

Applied, thank you.

Wanlong Gao

> ---
>  testcases/kernel/syscalls/adjtimex/adjtimex01.c | 24 ++++++++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex01.c b/testcases/kernel/syscalls/adjtimex/adjtimex01.c
> index b995e8e..d16a5f3 100644
> --- a/testcases/kernel/syscalls/adjtimex/adjtimex01.c
> +++ b/testcases/kernel/syscalls/adjtimex/adjtimex01.c
> @@ -42,7 +42,7 @@ static void setup(void);
>  static void cleanup(void);
> 
>  char *TCID = "adjtimex01";
> -int TST_TOTAL = 1;
> +int TST_TOTAL = 2;
> 
>  static struct timex tim_save;
> 
> @@ -66,10 +66,26 @@ int main(int ac, char **av)
>  		TEST(adjtimex(&tim_save));
> 
>  		if ((TEST_RETURN >= 0) && (TEST_RETURN <= 5)) {
> -			tst_resm(TPASS, "adjtimex() returned %ld", TEST_RETURN);
> +			tst_resm(TPASS, "adjtimex() with mode %u returned %ld",
> +				 SET_MODE, TEST_RETURN);
>  		} else {
> -			tst_resm(TFAIL | TTERRNO, "Test Failed, adjtimex()"
> -				 "returned %ld", TEST_RETURN);
> +			tst_resm(TFAIL | TTERRNO,
> +				"Test Failed, adjtimex() with mode %u "
> +				"returned %ld", SET_MODE, TEST_RETURN);
> +		}
> +
> +		/* Call adjtimex(2) */
> +		tim_save.modes = ADJ_OFFSET_SINGLESHOT;
> +
> +		TEST(adjtimex(&tim_save));
> +
> +		if ((TEST_RETURN >= 0) && (TEST_RETURN <= 5)) {
> +			tst_resm(TPASS, "adjtimex() with mode %u returned %ld",
> +				 ADJ_OFFSET_SINGLESHOT, TEST_RETURN);
> +		} else {
> +			tst_resm(TFAIL | TTERRNO,
> +				"Test Failed, adjtimex() with mode %u returned "
> +				"%ld", ADJ_OFFSET_SINGLESHOT, TEST_RETURN);
>  		}
>  	}
> 


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2013-04-22  2:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  3:32 [LTP] [PATCH]syscalls/adjtimex01.c: cleanup DAN LI
2013-04-19  9:34 ` Wanlong Gao
     [not found] ` <5170BBCE.3090503@cn.fujitsu.com>
2013-04-19  9:34   ` [LTP] [PATCH]syscalls/adjtimex01.c: Test for mode ADJ_OFFSET_SINGLESHOT Wanlong Gao
2013-04-22  2:15   ` Wanlong Gao [this message]
2013-04-22  2:17 ` [LTP] [PATCH]syscalls/adjtimex01.c: cleanup Wanlong Gao

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=51749D4A.9030305@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=li.dan@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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.