mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: "Robert Williamson" <robbiew@us.ibm.com>
Cc: Andi Kleen <ak@suse.de>,
	aniruddha.marathe@wipro.com, linux-kernel@vger.kernel.org,
	ltp-list@lists.sourceforge.net
Subject: Re: Same syscall is defined to different numbers on 3 different archs(was Re: Makefile  issue)
Date: Mon, 7 Apr 2003 11:08:27 -0700	[thread overview]
Message-ID: <16017.48795.43569.182784@napali.hpl.hp.com> (raw)
In-Reply-To: <OFA555B9E6.223C91CB-ON85256D01.00582D99-86256D01.005A64CB@pok.ibm.com>

>>>>> On Mon, 7 Apr 2003 11:26:49 -0500, "Robert Williamson" <robbiew@us.ibm.com> said:

  Robert> Hmmm...so I guess the only viable solution for a single test
  Robert> to cover as many archs as possible, is to explicitly define
  Robert> the number for each arch.

  Robert> Here's how I would do it Aniruddha:
  Robert> ------------------------------------------
  Robert> #ifdef __i386__
  Robert> #define __NR_timer_create 259
  Robert> #endif

  Robert> #ifdef __x86_64__
  Robert> #define __NR_timer_create 222
  Robert> #endif

  Robert> #if defined(__ppc__) || defined(__ppc64__)
  Robert> #define __NR_timer_create 240
  Robert> #else /* Not defined on this architecture */

  Robert> #include "test.h"
  Robert> #include "usctest.h"

  Robert> int TST_TOTAL = 0;      /* Total number of testcases */

  Robert> int main()
  Robert> {
  Robert> tst_resm(TCONF,"This system call is not defined for this architecture.");
  Robert> tst_exit();
  Robert> /* NOT REACHED */
  Robert> return(0);
  Robert> }
  Robert> #endif /* Not defined on this architecture */

  Robert> <REST OF TEST HERE>
  Robert> ------------------------------------------

  Robert> Any comments???

Why use such ugly, platform-dependent code when syscall(3) will do it
just fine?  (AFAIK, there is no man-page for syscall(3), but the glibc
info manual documents it in detail.)

	--david

  reply	other threads:[~2003-04-07 17:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF51DE965A.FDCB6DBE-ON85256D01.005201B1-86256D01.005610CF@pok.ibm.com.suse.lists.linux.kernel>
2003-04-07 15:54 ` Andi Kleen
2003-04-07 16:26   ` Robert Williamson
2003-04-07 18:08     ` David Mosberger [this message]
2003-04-07 18:16       ` Robert Williamson
2003-04-07 18:49         ` David Mosberger
2003-04-08  2:23   ` Werner Almesberger
2003-04-08 13:30     ` [LTP] " Paul Larson
2003-04-08 19:47       ` Werner Almesberger
2003-04-07 15:39 Robert Williamson
2003-04-07 17:38 ` Robert Love

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=16017.48795.43569.182784@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=ak@suse.de \
    --cc=aniruddha.marathe@wipro.com \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=robbiew@us.ibm.com \
    /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

all inboxes | Powered by JetHome®