----- Original Message -----
> From: "Caspar Zhang" <[email protected]>
> To: "Jan Stancek" <[email protected]>
> Cc: [email protected], "Jeffrey Burke" <[email protected]>
> Sent: Monday, 23 April, 2012 1:13:11 PM
> Subject: Re: [LTP] [PATCH 3/3] syscalls/cma: add errno tests
> 
> On 04/23/2012 06:32 PM, Jan Stancek wrote:
> > Based on proposed man page:
> > http://ozlabs.org/~cyeoh/cma/process_vm_readv.txt
> > 
> > Signed-off-by: Jan Stancek <[email protected]>
> > ---
> >  testcases/kernel/syscalls/cma/cma01.c              |  434
> >  ++++++++++++++++++++
> >  .../kernel/syscalls/cma/process_vm_readv/Makefile  |    7 +
> >  .../kernel/syscalls/cma/process_vm_writev/Makefile |    7 +
> 
> [snip]
> 
> > +static void cma_test_params_read(struct process_vm_params *params)
> > +{
> > +#if (HAVE_PROCESS_VM_READV==1)
> > +   TEST(process_vm_readv(params->pid,
> > +       params->lvec, params->liovcnt,
> > +       params->rvec, params->riovcnt,
> > +       params->flags));
> > +#elif defined(__NR_process_vm_readv)
> > +   TEST(syscall(__NR_process_vm_readv, params->pid,
> > +       params->lvec, params->liovcnt,
> > +       params->rvec, params->riovcnt,
> > +       params->flags));
> > +#else
> > +   tst_brkm(TCONF, cleanup, "process_vm_readv does not exist on"
> > +       " your system");
> > +#endif
> 
> omit other parts since looking good to me.
> 
> Still the question left for open-discussion: isn't syscall-only
> testing
> enough, do we need to test glibc wrapper in higher priority?

When looking at other tests, my impression was that LTP uses
glibc wrappers if available. That interface is what users will most
likely use in the end.

Since this is new syscall, glibc wrapper may not be available,
in which case it tries syscall(2).

Regards,
Jan

> 
> Thanks,
> Caspar
> 
> > +}
> > +
> > +static void cma_test_params_write(struct process_vm_params
> > *params)
> > +{
> > +#if (HAVE_PROCESS_VM_WRITEV==1)
> > +   TEST(process_vm_writev(params->pid,
> > +       params->lvec, params->liovcnt,
> > +       params->rvec, params->riovcnt,
> > +       params->flags));
> > +#elif defined(__NR_process_vm_writev)
> > +   TEST(syscall(__NR_process_vm_writev, params->pid,
> > +       params->lvec, params->liovcnt,
> > +       params->rvec, params->riovcnt,
> > +       params->flags));
> > +#else
> > +   tst_brkm(TCONF, cleanup, "process_vm_writev does not exist on"
> > +       " your system");
> > +#endif
> > +}
> 
> [snip]
> 
> 

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to