[CRIU] [PATCH 3/4] test: poll -- Use gettimeofday syscall directly
Christopher Covington
cov at codeaurora.org
Thu Mar 26 06:07:38 PDT 2015
Hi Cyrill,
On 03/26/2015 04:23 AM, Cyrill Gorcunov wrote:
> The gettimeofday uses /etc/localtime (thanks avagin@
> for the hint) which is not present in namespace tests.
> So lets use syscall directly and make test pass in
> namespace environment as well.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> test/zdtm/live/static/poll.c | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/test/zdtm/live/static/poll.c b/test/zdtm/live/static/poll.c
> index 85f545593b6e..db4b427ce3e2 100644
> --- a/test/zdtm/live/static/poll.c
> +++ b/test/zdtm/live/static/poll.c
> @@ -19,6 +19,24 @@
> const char *test_doc = "Check poll() timeouts";
> const char *test_author = "Cyrill Gorcunov <gorcunov at parallels.com>";
>
> +#ifdef __x86_64__
> +#define __NR_gettimeofday 96
> +#else
> +#define __NR_gettimeofday 78
> +#endif
Does SYS_gettimeofday from <sys/syscall.h> not work?
http://man7.org/linux/man-pages/man2/syscall.2.html
Thanks,
Chris
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
More information about the CRIU
mailing list