All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] clone/clone08.c: check whether clone supports 7 arguments
Date: Thu, 9 Jan 2014 08:23:48 -0500 (EST)	[thread overview]
Message-ID: <1382348670.13310097.1389273828896.JavaMail.root@redhat.com> (raw)
In-Reply-To: <201401090803.39606.vapier@gentoo.org>



----- Original Message -----
> From: "Mike Frysinger" <vapier@gentoo.org>
> To: ltp-list@lists.sourceforge.net
> Sent: Thursday, 9 January, 2014 2:03:38 PM
> Subject: Re: [LTP] [PATCH] clone/clone08.c: check whether clone supports 7	arguments
> 
> On Wednesday 08 January 2014 09:31:30 Zeng Linggang wrote:
> > +AC_DEFUN([LTP_CHECK_CLONE7ARGS],[
> > +AH_TEMPLATE(HAVE_CLONE7ARGS,
> > +[Define to 1 if clone() supports 7 arguments.])
> > +AC_MSG_CHECKING([for CLONE7ARGS])
> > +AC_TRY_LINK([#define _GNU_SOURCE
> > +		#include <sched.h>
> > +		#include <stdlib.h>],
> > +		[
> > +		#if !defined(__ia64__)
> > +		clone(NULL, NULL, 0, NULL, NULL, NULL, NULL);
> > +		#endif
> > +		],
> > +		AC_DEFINE(HAVE_CLONE7ARGS) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> > +])
> 
> you aren't really testing for "clone takes 7 args", you're testing for "clone
> has varargs support".  rename the define (and use _ in its name), and drop
> the
> ia64 check as it isn't needed.

Why not? It should matter, according to clone(2) you should be using __clone2() on ia64:
   ia64
       On ia64, a different interface is used:

       int __clone2(int (*fn)(void *),
                    void *child_stack_base, size_t stack_size,
                    int flags, void *arg, ...
                 /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */ );

# cat a.c
#define _GNU_SOURCE
#include <sched.h>
#include <stdlib.h>

int main()
{
	clone(NULL, NULL, 0, NULL, NULL, NULL, NULL);
	return 0;
}

# uname -m
ia64

# gcc a.c
/tmp/cc0QVVOU.o: In function `main':
a.c:(.text+0x42): undefined reference to `clone'
collect2: ld returned 1 exit status

So perhaps we should add #else and test for __clone2 on ia64.

Regards,
Jan

> -mike
> 
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2014-01-09 13:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  9:29 [LTP] [PATCH v5 1/2] lib/cloner.c: add more args zenglg.jy
2013-12-23  1:11 ` Wanlong Gao
2014-01-07 14:09 ` chrubis
     [not found]   ` <1389181297.2879.11.camel@G08JYZSD130126>
2014-01-08 13:20     ` chrubis
     [not found]   ` <1389191490.2879.27.camel@G08JYZSD130126>
2014-01-08 15:15     ` [LTP] [PATCH] clone/clone08.c: check whether clone supports 7 arguments chrubis
     [not found]       ` <1389254938.2025.3.camel@G08JYZSD130126>
2014-01-09 11:36         ` chrubis
     [not found]           ` <1389269411.2149.8.camel@G08JYZSD130126>
2014-01-09 13:27             ` [LTP] [PATCH???v3] lib/cloner.c: add function ltp_clone7 when clone supports???7 arguments chrubis
     [not found]             ` <201401090947.12749.vapier@gentoo.org>
2014-01-09 15:04               ` chrubis
2014-01-09 16:37               ` chrubis
     [not found]                 ` <629935924.13499645.1389289589284.JavaMail.root@redhat.com>
2014-01-09 18:08                   ` chrubis
     [not found]                     ` <201401091417.16506.vapier@gentoo.org>
2014-01-13 16:02                       ` chrubis
     [not found]     ` <201401081447.46449.vapier@gentoo.org>
2014-01-09 11:24       ` [LTP] [PATCH] clone/clone08.c: check whether clone supports 7 arguments chrubis
     [not found]     ` <201401090803.39606.vapier@gentoo.org>
2014-01-09 13:09       ` chrubis
     [not found]         ` <201401090900.59568.vapier@gentoo.org>
2014-01-09 14:34           ` chrubis
2014-01-09 13:23       ` Jan Stancek [this message]
2014-01-09 13:51         ` Mike Frysinger
2014-01-09 14:10           ` Jan Stancek
2014-01-09 14:30             ` Mike Frysinger
2014-01-09 14:39               ` 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=1382348670.13310097.1389273828896.JavaMail.root@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vapier@gentoo.org \
    /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.