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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2125 Actions


    Problem Report Number 2125
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.1090
    Raised 2001-07-20 08:00
    Updated 2003-03-13 08:00
    Published 1907-08-01 08:00
    Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSTH version 5.2.3
    Test Identification PTHR.os/ioprim/pwrite 1
    Problem Summary TSD5TH.00087 This assertion fails on faster machines due to a timing problem in the test suite. The following is the snippet of code that gets the start and end time and calls pwrite T1_starttime = time(NULL); rva...
    Problem Text

    This assertion fails on faster machines due to a timing problem in
    the test suite.

    The following is the snippet of code that gets the start and end
    time and calls pwrite

    T1_starttime = time(NULL);

    rval = pwrite( fd, (void *) buf, T1_WSIZE, TF_OFFSET / 2 );

    T1_endtime = time(NULL);

    On faster machines, the three lines of code above can happen within
    the same second. Because time() and ctime and mtime are all in
    seconds, there is not enough granularity in the time unit, it becomes
    a rounding issue, where time() is rounding up, and ctime and mtime
    were rounded down.

    If a sleep() is added after the first call to time(), the test passes.

    A similiar test in the VSU test suite, writev #32, has included the
    sleep() after the first call to time() to deal with this timing
    problem.
    Test Output
    *******************************************************************************************
    /tset/PTHR.os/ioprim/pwrite/T.pwrite 1 Failed

    Test Description:
    A call to pwrite(fildes, buf, nbytes, offset) attempts to write nbytes
    from the buffer referenced by buf to the file associated with
    fildes at the position specified by offset without modifying the file offset,
    mark for update the st_ctime and st_mtime files of the file,
    and return the number of bytes written if successful.
    XCAE ref: Component PWRITE Assertion 1(A)

    Test Information:
    A call to pwrite(fildes, buf, nbytes, offset) attempts to write
    nbytes from the buffer referenced by buf to the file associated with
    fildes at the position specified by offset without modifying the
    file offset,
    mark for update the st_ctime and st_mtime files of the file,
    and return the number of bytes written if successful.
    XCAE ref: Component PWRITE Assertion 1(A)
    Unexpected st_ctime 995018476, expected value between 995018477 and 995018477
    Unexpected st_mtime 995018476, expected value between 995018477 and 995018477

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

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response

    The assessment that this is a timing issue is correct, and a delay between
    taking the system time and calling pwrite is indeed needed. Using a call
    to sleep(), as suggested, would be a reasonable method to achieve this.

    We accept this as a Test Suite Deficiency.


    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