HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 2336 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 2336.


Report 2336 Actions


    Problem Report Number 2336
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.1204
    Raised 2004-02-13 20:39
    Updated 2004-02-16 18:39
    Published 2004-02-16 18:39
    Product Standard Internationalised System Calls and Libraries Extended V3 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSRT version 5.2.5
    Test Identification rt.os/mfiles/mmap test 22
    Specification Base Definitions Issue 6
    Location in Spec starting at line 41201 in the SUSv3 TC1 pdf.
    Problem Summary Non SUSv3 flag passed to shm_open()
    Problem Text This problem was found after applying the suggested fix in PR2335.

    in mmap.c, test22 the following code is found:

    fd = vsrt_open_shm(shbuf, O_WRONLY, VSRT_PROT_ALL);

    then in vsrt_open_shm()(SRC/common/vsrtlib/mkmmap.c)

    int vsrt_open_shm(s, flag, mode)
    char *s;
    int flag;
    mode_t mode;
    {
    return vsrt_open_shm_np(s, flag, mode, 2);
    }

    so flag is set to O_WRONLY

    following the code:

    int vsrt_open_shm_np(s, flag, mode, npages)
    ....
    if ((fd = shm_open(s, (O_RDWR|O_CREAT|O_TRUNC),
    (mode_t)(S_IRWXU|S_IRWXG|S_IRW
    XO))) == -1) {
    ....
    if ((fd = shm_open(s, flag, mode)) == -1) {

    so this translates to

    if ((fd = shm_open(s, O_WRONLY, VSRT_PROT_ALL)) == -1) {

    However, SUSv3 TC1 rationale(description states the same but in more
    detail) states:

    "The set of valid open flags to shm_open( ) was restricted to O_RDONLY,
    O_RDWR, O_CREAT, and O_TRUNC because these could be easily implemented
    on most memory mapping systems. This volume of IEEE Std 1003.1-2001 is
    silent on the results if the implementation cannot supply the requested
    file access because of implementation-defined reasons, including
    hardware ones."


    so O_WRONLY is not a valid flag for shm_open() and our implementation
    correctly returns EINVAL.
    Test Output
    ************************************************************************
    /tset/rt.os/mfiles/mmap/T.mmap 22 Failed

    Test Description:
    If _POSIX_SHARED_MEMORY_OBJECTS is defined or the implementation
    supports the mmap() function as defined in System Interfaces and
    Headers, Issue 5:
    A call to mmap() for a shared memory object when fildes is not
    open
    for reading, regardless of the protection specified, shall return
    MAP_FAILED and set errno to EACCES.


    Test Information:
    vsrt_open_shm_np: second shm_open() failed for "/tmp/vsrt_shmem2",
    errno = 22 (EINVAL)


    ************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date 2004-02-13 20:39
    Last Updated 2004-02-13 23:28
    Completed 2004-02-13 23:28
    Status Complete
    Review Recommendation Test Suite Deficiency (TSD)
    Review Response This is accepted as a fault in the test suite.

    Review Type SA Review
    Start Date 2004-02-13 23:28
    Last Updated 2004-02-14 00:42
    Completed 2004-02-14 00:42
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion This PR represents and agreed test suite deficiency

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority