----- Original Message -----
> On Jan 11, 2011, at 12:57 AM, CAI Qian wrote:
> 
> > Signed-off-by: CAI Qian <[email protected]>
> > ---
> > testcases/kernel/mem/oom/oom04.c | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/testcases/kernel/mem/oom/oom04.c
> > b/testcases/kernel/mem/oom/oom04.c
> > index 5b403f4..befb7e9 100644
> > --- a/testcases/kernel/mem/oom/oom04.c
> > +++ b/testcases/kernel/mem/oom/oom04.c
> > @@ -133,6 +133,8 @@ void setup(void)
> > {
> >     int fd;
> >
> > + tst_require_root(tst_exit);
> > +
> >     tst_sig(FORK, DEF_HANDLER, cleanup);
> >     TEST_PAUSE;
> 
> tst_require_root(NULL) is what you want for all of these patches.
> Makes me wonder if there's any value in having a cleanup argument or
> not...
I did try tst_require_root(NULL), but it kept calling cleanup() which
was unnecessary.

$ ./hugemmap05
hugemmap05    1  TCONF  :  Test needs to be run as root
hugemmap05    0  TWARN  :  open: errno=EACCES(13): Permission denied
hugemmap05    0  TINFO  :  restore nr_hugepages to .
hugemmap05    0  TWARN  :  write: errno=EBADF(9): Bad file descriptor
hugemmap05    0  TWARN  :  open: errno=EACCES(13): Permission denied
hugemmap05    0  TINFO  :  restore nr_overcommit_hugepages to .
hugemmap05    0  TWARN  :  write: errno=EBADF(9): Bad file descriptor
hugemmap05    0  TWARN  :  umount: errno=ENOENT(2): No such file or directory

CAI Qian

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to