Vijay, On Thu, Jul 24, 2008 at 7:37 PM, Vijay Kumar <[EMAIL PROTECTED]> wrote: > Hi Subrata, > I am in the process of writing test cases for eventfd() > syscall. Please do let me know if anybody else is also working on the > it. > > Here is a list of test cases I am implementing. > > 1. Reading counter value. > 2. EAGAIN for read in non-blocking mode when counter value is zero. > 3. Writing counter value. > 4. EAGAIN for write in non-blocking mode when counter value exceed max. > 5. EINVAL for write when buffer size is less than 8 in read and write. > 6. EINVAL for write when the counter is set to 0xffffffffffffffff. > 7. In select, check if readfds is set when counter value is non-zero. > 8. In select, check if readfds is not set when counter value is zero. > 9. In select, check if writefds is set when counter value is non-max. > 10. In select, check if writefds is not set when counter value is max. > 11. Check if file descriptor is inherited by child.
Some others to consider adding: * Check whether counter is correctly initialized from initval. * I'm not sure what kind of check you are doing in 11, but perhaps one should somewhere have a test that checks whether writing to the eventfd in the child means the child can read from the eventfd. * exceptional condition (select(exceptfds) when the counter is overflowed; and in this case read() shd return 0xffffffffffffffff. * eventfd file descriptor is preserved across execve() If you want more detail on any of the above, let me know. Cheers, Michael ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list