Re: [LTP] Test Case Design for move_pages()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2008-06-14 at 12:18 +0530, Vijay Kumar wrote:
> Hi everyone,
> here is the initial test case design for move_pages(). Please
> do send in your review comments. Do let me know, if any other
> test cases are required. The test cases are based on the man
> page available at http://linux.die.net/man/2/move_pages

Thank you very much for quickly posting your design. I would loop in few
more people i know who are also trying to write some similar test cases
on move_pages, for better understanding, and for the sake that both your
´s and their work can be mutually beneficial.

Nagesh/Supriya,

Can you please look in to this design aspects of Vijay. I would like to
propose few things here:

1) Nagesh/Supriya, please provide review comments to Vijay on his
design,
2) Vijay can go ahead in writing those tests that he has proposed. You
can review his patches then,
3) You can propose what additional tests needs to be done. And you can
write those additional tests.

With this we can perhaps avoid duplication of effort. What do you say ?

I also found a sample test case for move_pages() on the net:
https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/marcel/examples/nouma/simple/test_move_pages.c?rev=18613&root=pm2&view=markup,

Regards--
Subrata

> 
> BTW, I am planning to do the testing using numa=fake, hope
> that should suffice.
> 
> Test 1: Test retrieval of NUMA node
> 
> 1. Allocate pages in NUMA nodes A and B
> 2. Use move_pages() to retrieve the NUMA node of the pages.
> 3. Check if the NUMA nodes reported are correct.
> 
> Test 2: Test movement of pages mapped by a process
> 
> 1. Allocate pages in NUMA node A.
> 2. Use move_pages() to move the pages to NUMA node B.
> 3. Retrieve the NUMA nodes of the moved pages.
> 4. Check if all pages are in node B.
> 
> Test 3: Test movement of shared pages
> 
> 1. Start the test case program as root.
> 2. Allocate a shared memory in NUMA node A.
> 3. Fork another process.
> 4. Use move_pages() to move the pages to NUMA node B, with the
> MPOL_MF_MOVE_ALL.
> 5. Check if all pages are in node B.
> 
> Test 4: Failure when page address is invalid
> 
> 1. Pass an invalid pointer as one of the page addresses to move_pages().
> 2. Check if the corresponding status is set to -EFAULT.
> 
> Test 5: Failure when page is mlocked
> 
> 1. Pass a pointer to a mlocked page to move_pages().
> 2. Check if the corresponding status is set to -EPERM.
> 
> Test 6: Failure when shared page is moved without MPOL_MF_MOVE_ALL
> 
> 1. Start test case program as root.
> 2. Allocate a shared memory page.
> 3. Fork another process.
> 4. Pass a pointer to a shared page to move_pages(), without
> the MPOL_MF_MOVE_ALL flag.
> 5. Check if the corresponding status is set to -EACCES.
> 
> Test 7: Failure when the NUMA node is invalid
> 
> 1. Pass a non-existent NUMA node number to move_pages().
> 2. Check if errno is set to ENODEV.
> 
> Test 8: Failure when the PID is invalid
> 
> 1. Pass a non-existent PID to move_pages().
> 2. Check if errno is set to ESRCH.
> 
> Test 9: Failure when the no. of pages is ULONG_MAX
> 
> 1. Pass ULONG_MAX pages to move_pages().
> 2. Check if errno is set to E2BIG.
> 
> Test 10: Failure when all pages are in required NUMA node
> 
> 1. Pass the actual NUMA node number for each page to move_pages().
> 2. Check if errno is set to ENOENT.
> 
> Test 11: Failure when flags is invalid
> 
> 1. Pass invalid flags to move_pages().
> 2. Check if errno is set to EINVAL.
> 
> Test 12: Failure when trying move shared pages
> 
> 1. Allocate a shared memory in NUMA node A.
> 2. Fork another process.
> 3. Use move_pages() to move the pages to NUMA node B, with the
> MPOL_MF_MOVE_ALL.
> 4. Check if errno is set to EPERM.
> 
> TODO:
> 
> * Test case for errno = EACCES.
> * Test case for errno = EINVAL, due to page being in a kernel thread.
> * Test case for status[] = ENOENT.
> * Test case for status[] = EBUSY.
> 
> Regards,
> Vijay 
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/ltp-list

--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux