public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v2 3/3] setns: add new syscall test setns02
Date: Tue, 12 Feb 2013 14:09:26 +0100	[thread overview]
Message-ID: <20130212130926.GD9378@rei> (raw)
In-Reply-To: <1704604395.1338521.1360674295147.JavaMail.root@redhat.com>

Hi!
> > > +static void setup(void)
> > > +{
> > > +	char tmp[PATH_MAX];
> > > +
> > > +	tst_require_root(NULL);
> > > +
> > > +	/* runtime check if syscall is supported */
> > > +	syscall(__NR_setns, -1, 0);
> > > +
> > 
> > What happens when the syscall is not supported? The call should
> > return
> > -1 and errno should be set to ENOSYS but the return value is not
> > checked, I'm puzzled.
> 
> It's a bit unfortunate name collision with syscall macro defined
> in linux_syscall_numbers.h. That macro contains check for ENOSYS.

Ah, now I remeber.

We really should change that one. Any volunteers?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2013-02-12 13:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 11:55 [LTP] [PATCH v2 0/3] add new syscall test for setns(2) Jan Stancek
2013-02-06 11:55 ` [LTP] [PATCH v2 1/3] setns: setup directory at kernel/syscalls/setns Jan Stancek
2013-02-06 11:55 ` [LTP] [PATCH v2 2/3] setns: add new syscall test setns01 Jan Stancek
2013-02-12 12:33   ` chrubis
2013-02-06 11:55 ` [LTP] [PATCH v2 3/3] setns: add new syscall test setns02 Jan Stancek
2013-02-12 12:41   ` chrubis
     [not found]     ` <1704604395.1338521.1360674295147.JavaMail.root@redhat.com>
2013-02-12 13:09       ` chrubis [this message]
     [not found]         ` <1446382265.1343619.1360674762081.JavaMail.root@redhat.com>
2013-02-12 13:16           ` 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=20130212130926.GD9378@rei \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox