public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/stime: Use 3 variants via test_multiplex()
Date: Thu, 28 Mar 2019 07:52:53 +0100	[thread overview]
Message-ID: <20190328065243.GB11011@x230> (raw)
In-Reply-To: <1553668210-6141-1-git-send-email-yangx.jy@cn.fujitsu.com>

Hi Xiao,

> diff --git a/testcases/kernel/syscalls/stime/stime01.c b/testcases/kernel/syscalls/stime/stime01.c
...
> +static int do_stime(time_t *ntime)
> +{
> +	switch (tst_variant) {
> +	case 0:
> +#ifdef __ANDROID__
> +		tst_brk(TCONF, "libc stime() is not implemented for Android");
IMHO this is not optimal. 1) That might change in the future, 2) Why not to fix
it for other foo libc implementations, which might suffer the same problem.
Therefore IMHO autotools check should be used.

> +#else
> +		return stime(ntime);
> +#endif
> +	case 1:
> +		return tst_syscall(__NR_stime, ntime);
> +	case 2: {
> +		struct timeval tv;
> +
> +		tv.tv_sec = *ntime;
> +		tv.tv_usec = 0;
> +
> +		return tst_syscall(__NR_settimeofday, &tv, (struct timezone *) 0);
> +	}
> +	}

Kind regards,
Petr

  parent reply	other threads:[~2019-03-28  6:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27  6:30 [LTP] [PATCH] syscalls/stime: Use 3 variants via test_multiplex() Xiao Yang
2019-03-27  6:36 ` Xiao Yang
2019-03-27 20:13   ` Steve Muckle
2019-03-28  5:24     ` Xiao Yang
2019-03-28  6:52 ` Petr Vorel [this message]
2019-03-28  9:40   ` Xiao Yang
2019-03-28 13:40     ` Petr Vorel

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=20190328065243.GB11011@x230 \
    --to=petr.vorel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox