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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1478 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 1478.


Report 1478 Actions


    Problem Report Number 1478
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0760
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1995-10-31 08:00
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.0.2
    Test Identification base/msync 3
    Problem Summary TSD4U.00053 The test may fail if an IUT does not allow an address obtained via a mmap(MAP_SHARED) call to be used in a later mmap(MAP_PRIVATE) call.
    Problem Text
    The test may fail if an IUT does not allow an address obtained via
    a mmap(MAP_SHARED) call to be used in a later mmap(MAP_PRIVATE) call.

    line 16, 17, 18:
    This test calls map3() and fails with EINVAL because it
    cannot establish a mapping with MAP_FIXED flag when ask_addr
    is obtained using MAP_SHARED flag. Specifically, this is
    what the code does (refer to CAPI/SRC/LIB/capi_mmap/mkmmap.c):

    ask_addr = (0, 3*pgsz, PROT_NONE, MAP_SHARED, fd, 0);
    munmap(ask_addr, 3*pgsz);
    fixad = mmap(ask_addr, pgsz, prot1, MAP_PRIVATE|MAP_FIXED, fd, 0)

    Since "ask_addr" is obtained by using MAP_SHARED flag, our
    implemention does not allow mapping of ask_addr to a fixed
    address using MAP_PRIVATE flag; therefore, fails with EINVAL.
    Our implementaion does not violate the standards since the
    X/OPEN man pages states: If MAP_FIXED is set, mmap() may return
    (viod *)-1 and set errno to [EINVAL]. The algorithm for our
    implementation will have to match the flag:

    if (flags1 == MAP_SHARED) {
    ask_addr = (0, 3*pgsz, PROT_NONE, MAP_SHARED, fd, 0);
    munmap(ask_addr, 3*pgsz);
    fixad = mmap(ask_addr, pgsz, prot1, MAP_SHARE|MAP_FIXED, fd, 0)
    } else if (flags1 == MAP_PRIVATE) {
    ask_addr = (0, 3*pgsz, PROT_NONE, MAP_PRIVATE, fd, 0);
    munmap(ask_addr, 3*pgsz);
    fixad = mmap(ask_addr, pgsz, prot1,MAP_PRIVATE|MAP_FIXED, fd, 0)
    }

    But then, the above algorithm does not fit into the logic of the
    map3() function.

    In Summary,
    Either the test or the library function, map3(), has to be
    redesigned and rewritten since the current algorithm does not
    work on our implementation.
    Test Output
    1 SECTION: Discrete Tests
    2
    3 TEST CASE: msync
    4
    5 TEST PURPOSE #3
    6 A successful call to int msync(void *addr, size_t len,
    7 int flags) when flags contains the flag MS_INVALIDATE
    8 shall invalidate all cached copies of all pages in the
    9 range [addr,addr+len] and return 0.
    10 PREP: Obtain the system page size by call to
    11 sysconf(_SC_PAGESIZE)
    12 PREP: Establish signal handlers for SIGSEGV
    13 PREP: Open a file and initialize it
    14 PREP: Allocate memory for buffer
    15 PREP: Now set proper permissions and re-open file
    16 PREP: Find a fixed address for mapping text
    17 PREP: Map first section
    18 ERROR: mmap failed, errno = 22(EINVAL - Invalid argument)
    19 3 UNRESOLVED

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We agree this is a test suite deficiency in the test
    suite version(s) listed.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion
    This is an agreed Test Suite Deficiency.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority