On Mon, Jan 10, 2011 at 4:21 PM, CAI Qian <[email protected]> wrote:
>
>> I applied your fixes but the test is still buggy in the following
>> ways:
>>
>> 1. It has to be run as root (otherwise it fails with EPERM opening the
>> file).
> That is true for lots of LTP tests. To get the most of our of tests, it
> requests root privilege. We can even setup config scripts to warning people
> about the non-root users. Again, what is the guideline here? We probably
> don't want to add many code to each of the test that required root.

tst_require_root(NULL) is all you need to do in setup() if you need
it. You can test a lot of EACCES and EPERM cases if you use users
other than root.

Most of the testcases that slack in this area that I've seen are the
newer ones. The older testcases by IBM and SGI do the right thing when
it comes to requiring root privileges.

>> 2. Even when the test is run as root it leaves around allocated
>> hugepages, despite the fact that the temporary filesystem has been
>> unmounted.
> Would you please be elaborate the failure? I can't see why it would work
> that way. The cleanup routine does this.
>
> - restore nr_hugepages
> - restore nr_overcommit_hugepages
> - unlink && umount (mmap case)
> - shmdt (shmget case)

It's a little better now that it's using a temporary directory, but it
still fails when I call it like:

./hugemmap05

on Fedora 13/i386 (first the mmap fails, then the test tries to do a
bunch of stuff in cleanup, including unmount the hugemmap filesystem
-- which fails with EBUSY -- and remove the temporary directory --
which fails because the mountpoint isn't unmounted -- and fails).

Thanks,
-Garrett

------------------------------------------------------------------------------
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