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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2395 Actions


    Problem Report Number 2395
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.1238
    Raised 2004-06-11 18:08
    Updated 2004-06-14 14:08
    Published 2004-06-14 14:08
    Product Standard Internationalised System Calls and Libraries Extended V3 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSTH version 5.3.3
    Test Identification PTHR.os/sched_rt/pthread_setschedprio 2
    Specification Base Definitions Issue 6
    Location in Spec XSH6 pthread_setschedprio
    Problem Summary The "priority not changed" check expects the wrong priority
    Problem Text The problem with this assertion is a small bug in the code.

    The test does this:

    mytid = pthread_self();

    newparams.sched_priority = priority;
    rval = pthread_setschedparam( mytid, policy, &newparams);
    if ( rval != 0 )
    {
    vsth_surprise("pthread_setschedparam", 0, rval, errors);
    return;
    }

    --priority;
    rval = pthread_setschedprio(mytid, priority);
    if ( rval != EINVAL )
    {
    vsth_surprise("pthread_setschedprio", EINVAL, rval, fails);
    return;
    }

    /* check that priority not changed */
    rval = pthread_getschedparam( mytid, &val, &params );
    if ( rval )
    {
    vsth_surprise("pthread_getschedparam", 0, rval,
    errors);
    }
    else
    {
    if ( params.sched_priority != priority )
    {
    vsth_surprise( "pthread_getschedprio",
    priority,
    params.sched_priority,
    fails );
    }
    }

    The "failure" comes at the last vsth_surprise().
    Note that pthread_setschedprio() failed (properly) with EINVAL
    with the invalid priority (one less than the minimum priority,
    computed at the "--priority;" line).

    However, the test goes on to check that the priority did
    not actually change. Here the test is in error, because
    it tests against the reduced priority, not the original priority.
    Test Output For UNIX03 and POSIX01 modes:
    If _POSIX_THREAD_PRIORITY_SCHEDULING is set to 200112L
    When the value of prio is invalid and the impementation detects this,
    pthread_setschedprio(key, value) shall return EINVAL.
    pthread_getschedprio, expected -1, got 0
    pthread_getschedprio, expected -1, got 0

    Review Information

    Review Type TSMA Review
    Start Date 2004-06-11 18:08
    Last Updated 2004-06-11 19:10
    Completed 2004-06-11 19:10
    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-06-11 18:10
    Last Updated 2004-06-12 00:39
    Completed 2004-06-12 00:39
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion This PR represents an agreed Test Suite Deficiency (TSD)

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority