Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] syscall02: add invalid syscall number test
Date: Tue, 30 Jun 2026 18:40:46 +0200	[thread overview]
Message-ID: <20260630164046.GA474697@pevik> (raw)
In-Reply-To: <6a43a12c.b2781ae3.f5268.13b3@mx.google.com>

Hi Andrea,

> Hi Petr,

> > > I suggest add two more cases check:
> > > 1) -1
> > > 2) __NR_syscalls +1 (Base arch/powerpc/kernel/syscall.c)


> that was my initial idea, but different architectures are starting
> from a different value and I wanted to make it generic. I guess
> the right way would be to include syscalls.h and use
> __LTP__NR_INVALID_SYSCALL at this point. WDYT?

Yes, __LTP__NR_INVALID_SYSCALL is better than -1 (for all archs we have
#define __LTP__NR_INVALID_SYSCALL -1)

But I'd also use __NR_syscalls from <asm-generic/unistd.h> (the second suggested
case), i.e. have arch dependent value based on UAPI headers.

Also, you could add a real description to the values to .desc.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2026-06-30 16:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 14:03 [LTP] [PATCH] syscall02: add invalid syscall number test Andrea Cervesato
2026-06-29 14:53 ` [LTP] " linuxtestproject.agent
2026-06-30  0:29 ` [LTP] [PATCH] " Wei Gao via ltp
2026-06-30 10:20   ` Petr Vorel
2026-06-30 10:57     ` Andrea Cervesato via ltp
2026-06-30 16:40       ` Petr Vorel [this message]

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=20260630164046.GA474697@pevik \
    --to=pvorel@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --cc=ltp@lists.linux.it \
    /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