Re: [PATCH] syscall02: add invalid syscall number test
Petr Vorel <[email protected]>
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <20260630164046.GA474697@pevik> |
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