Re: [LTP] [PATCH] syscalls/cma: add runtime check to setup()

Jan Stancek
2013-04-24T06:54:05Z

----- Original Message -----
> From: "Mike Frysinger" <vapier@gentoo.org>
> To: ltp-list@lists.sourceforge.net
> Cc: "Jan Stancek" <jstancek@redhat.com>
> Sent: Tuesday, 23 April, 2013 6:13:31 PM
> Subject: Re: [LTP] [PATCH] syscalls/cma: add runtime check to setup()
>
> On Tuesday 23 April 2013 04:17:15 Jan Stancek wrote:
> > __NR_process_vm_readv / __NR_process_vm_writev defined doesn't
> > guarantee, that kernel supports these syscalls. Add check to setup(),
> > which uses ltp_syscall(). If syscall isn't supported it will
> > end the testcase with TCONF.
>
> delete all the "#else" branches since you're now using
> linux_syscall_numbers.h

Without that check in parent, you can end up in situation where some child
aborts first and then parent reports failure. By doing it early in setup() you can
avoid allocating resources that won't go away when process later terminates with TCONF.

Regards,
Jan