All of lore.kernel.org
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH v2] add new errno testes for timerfd_*
Date: Thu, 26 Jun 2014 12:38:17 +0200	[thread overview]
Message-ID: <20140626103816.GA10335@rei.Home> (raw)
In-Reply-To: <1751892689.30818356.1403778578891.JavaMail.zimbra@redhat.com>

Hi!
> > * Add EINVAL errno testes for timerfd_create(2)
> > 	- The clockid argument is neither CLOCK_MONOTONIC nor CLOCK_REALTIME,
> > 	  EINVAL would return.
> > 	- flags is invalid, EINVAL would return.
> > 
> > * Add EBADF, EFAULT and EINVAL errno testes for timerfd_gettime(2)
> > 	- fd is not a valid file descriptor, EBADF would return.
> > 	- curr_value is not valid a pointer, EFAULT would return.
> > 	- fd is not a valid timerfd file descriptor, EINVAL would return.
> > 
> > * Add EBADF, EFAULT and EINVAL errno testes for timerfd_settime(2)
> > 	- fd is not a valid file descriptor, EBADF would return.
> > 	- old_value is not valid a pointer, EFAULT would return.
> > 	- fd is not a valid timerfd file descriptor, EINVAL would return.
> > 	- flags is invalid, EINVAL would return.
> > 
> > Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
> > ---
> >  configure.ac                                       |   1 +
> >  include/lapi/timerfd.h                             |  52 ++++++++
> >  m4/ltp-timerfd.m4                                  |  25 ++++
> >  runtest/syscalls                                   |   3 +
> >  testcases/kernel/syscalls/.gitignore               |   3 +
> >  .../kernel/syscalls/timerfd/timerfd_create01.c     | 106 ++++++++++++++++
> >  .../kernel/syscalls/timerfd/timerfd_gettime01.c    | 131
> >  ++++++++++++++++++++
> >  .../kernel/syscalls/timerfd/timerfd_settime01.c    | 136
> >  +++++++++++++++++++++
> >  8 files changed, 457 insertions(+)
> >  create mode 100644 include/lapi/timerfd.h
> >  create mode 100644 m4/ltp-timerfd.m4
> >  create mode 100644 testcases/kernel/syscalls/timerfd/timerfd_create01.c
> >  create mode 100644 testcases/kernel/syscalls/timerfd/timerfd_gettime01.c
> >  create mode 100644 testcases/kernel/syscalls/timerfd/timerfd_settime01.c
> > 
> 
> Hi,
> 
> > +#if defined(HAVE_TIMERFD_CREATE)
> > +#include <sys/timerfd.h>
> > +#endif
> > +
> 
> just a small nit, you probably want this included if any of HAVE_TIMERFD_* is defined.
> Overall it looks good to me. I tested it on RHEL6.5 and 7.

Or add AC_CHECK_HEADERS() for sys/timerfd.h to the m4/ltp-timerfd.m4 and
use that instead.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2014-06-26 10:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 13:06 [LTP] [PATCH] add new errno testes for timerfd_* Zeng Linggang
2014-06-17  9:52 ` chrubis
     [not found]   ` <1403698904.2434.22.camel@G08JYZSD130126>
     [not found]     ` <1751892689.30818356.1403778578891.JavaMail.zimbra@redhat.com>
2014-06-26 10:38       ` chrubis [this message]
     [not found]         ` <1403834572.2119.6.camel@G08JYZSD130126>
     [not found]           ` <1407320291.2223.15.camel@G08JYZSD130126>
2014-08-06 11:00             ` [LTP] [PATCH v3] " chrubis

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=20140626103816.GA10335@rei.Home \
    --to=chrubis@suse.cz \
    --cc=jstancek@redhat.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.