nptl.BullOpenSource.Org Forum Index nptl.BullOpenSource.Org
NPTL Tests & Trace project. Homepage.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sem_open

 
Post new topic   Reply to topic    nptl.BullOpenSource.Org Forum Index -> Tests - Semaphores related functions
View previous topic :: View next topic  
Author Message
tHeDoc
Project Maintener


Joined: 21 Apr 2004
Posts: 237
Location: Echirolles, France

PostPosted: Mon Feb 21, 2005 4:22 pm    Post subject: sem_open Reply with quote

POSIX

POSIX is a registered trademark from the IEEE. The following assertions are derived from copyrighted material. Original text and copyright information can be found at http://www.opengroup.org.

Here is what POSIX requires for this function:

  1. sem_open associates a named semaphore with the process. The returned address may be used in calls to other semaphore-related functions, until the semaphore is closed.
  2. If oflag contains O_CREAT, the semaphore is created if it does not exists.
  3. The semaphore is created with value as initial value.
  4. The uid of the semaphore is set to the effective user ID of the process.
  5. The gid of the semaphore is set to a system default gid or to the effective gid of the process.
  6. The permission bits of the semaphore are set to the value of the mode argument except those set in the file mode creation mask of the process.
  7. If oflag contains O_EXCL and O_CREAT, the creation fails if the semaphore name already exists.
  8. If a process calls sem_open several times with the same name, the same adress must be returned as long as the semaphore has not been unlinked or closed as many times as opened.
  9. On failure, the function returns SEM_FAILED and sets errno to indicate the error.
  10. The function fails with EACCESS if the process has no sufficient privilege to open or create the semaphore.
  11. The function fails with EEXIST if the semaphore exists and O_CREAT and O_EXCL are specified.
  12. The function fails with EINTR if interrupted by a signal.
  13. The function fails with EINVAL if the name is invalid or value is greater than SEM_VALUE_MAX.
  14. The function fails with EMFILE if too many semaphore or file descriptors are already opened.
  15. The function fails with ENAMETOOLONG if name is too long.
  16. The function fails with ENFILE if too many semaphores are open in the system.
  17. The function fails with ENOENT if O_CREAT is not specified and the semaphore name does not exist.
  18. The function fails with ENOSPC if there is not enough space to create the new semaphore.

_________________
Sebastien Decugis.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tHeDoc
Project Maintener


Joined: 21 Apr 2004
Posts: 237
Location: Echirolles, France

PostPosted: Mon Feb 21, 2005 6:03 pm    Post subject: Conformance Status Reply with quote

Conformance Status

  • Assertion 1 is already tested in OPTS and does not need more testing.
  • Assertion 2 is tested implicitely in many testcases.
  • Assertion 3 is tested implicitely in many testcases.
  • Assertion 4 is not tested yet. As XSI semaphores and realtime semaphores are not required to interop, there is no POSIX way to check semaphore uid; therefore the assertion won't be tested.
  • Assertion 5 is not tested yet. As XSI semaphores and realtime semaphores are not required to interop, there is no POSIX way to check semaphoregid; therefore the assertion won't be tested.
  • Assertion 6 is not tested yet. As XSI semaphores and realtime semaphores are not required to interop, there is no POSIX way to check semaphore mode; therefore the assertion won't be tested.
  • Assertion 7 is already tested in OPTS and does not need more testing.
  • Assertion 8 is not tested yet. A new testcase will be written.
  • Assertion 9 is tested implicitely in many testcases.
  • Assertion 10 is already tested in OPTS and does not need more testing.
  • Assertion 11 is already tested in OPTS and does not need more testing.
  • Assertion 12 is not tested yet, but as the operation is not blocking, there is no need for a testcase for this assertion.
  • Assertion 13 is already tested in OPTS and does not need more testing.
  • Assertion 14 is not tested yet. No new testcase will be written for this feature, as it relies on implementation-specific material.
  • Assertion 15 is not tested yet. No new testcase will be written for this feature, as it relies on implementation-specific material.
  • Assertion 16 is not tested yet. No new testcase will be written for this feature, as it relies on implementation-specific material.
  • Assertion 17 is already tested in OPTS and does not need more testing.
  • Assertion 18 is not tested yet. No new testcase will be written for this feature, as it relies on implementation-specific material.

_________________
Sebastien Decugis.


Last edited by tHeDoc on Thu Feb 24, 2005 5:02 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tHeDoc
Project Maintener


Joined: 21 Apr 2004
Posts: 237
Location: Echirolles, France

PostPosted: Mon Feb 21, 2005 6:07 pm    Post subject: Scalability Status Reply with quote

Scalability Status

A new scalability test will be written for this routine, to check that the operation duration is not dependent on the number of opened semaphores. Also, assertions 14, 16 and 18 will be checked as well.

_________________
Sebastien Decugis.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tHeDoc
Project Maintener


Joined: 21 Apr 2004
Posts: 237
Location: Echirolles, France

PostPosted: Mon Feb 21, 2005 6:08 pm    Post subject: Stress Status Reply with quote

Stress Status

No stress test will be written here.

_________________
Sebastien Decugis.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tHeDoc
Project Maintener


Joined: 21 Apr 2004
Posts: 237
Location: Echirolles, France

PostPosted: Thu Feb 24, 2005 4:59 pm    Post subject: Conformance Tests Reply with quote

Conformance Tests

A new testcase has been submitted to OPTS:

_________________
Sebastien Decugis.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tHeDoc
Project Maintener


Joined: 21 Apr 2004
Posts: 237
Location: Echirolles, France

PostPosted: Mon Feb 28, 2005 9:57 am    Post subject: Scalability Test Reply with quote

Scalability Test

A new scalability test has been written:


Attached is a sample graphical output.



plot.png
 Description:
Sample graphical output -- sem_close is not scalable.

Download
 Filename:  plot.png
 Filesize:  9.58 KB
 Downloaded:  4644 Time(s)


_________________
Sebastien Decugis.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nptl.BullOpenSource.Org Forum Index -> Tests - Semaphores related functions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group