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

Mike Frysinger
2013-04-24T15:52:58Z

[-- Attachment #1.1: Type: Text/Plain, Size: 987 bytes --]

On Wednesday 24 April 2013 02:53:52 Jan Stancek wrote:
> From: "Mike Frysinger" <vapier@gentoo.org>
> > 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.

by including linux_syscall_numbers.h, you've guaranteed that
__NR_process_vm_readv will always be defined, thus the code under "#ifndef
__NR_process_vm_readv" will never be run, thus you should delete it.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 421 bytes --]

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]