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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1170 Actions


    Problem Report Number 1170
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0372
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Sockets (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.1.0
    Test Identification Sockets/getservbyname 1
    Problem Summary PG4U.00096 This IR claims that the test may fail if the IUT uses the same static servent structure for getservent() and getservbyname().
    Problem Text
    This test may fail because TP use a static data as the argument of
    getservbyname(), and dose not save it which gethostent() return.

    The CAE Specification says, in the IP Address Resolution Interface section,
    under endservent(): " The getservent(), getservbyname() and getservbyport()
    functions may return pointers to static data, which may be overwritten
    by subsequent calls to any of these functions."

    The testcase must save a static data which gethostent() return
    to local valiable, and use as argument of getservbyname().

    Test Output
    TEST PURPOSE #1
    A successful call to struct servent
    *getservbyname(const char *name, const char *proto)
    shall return a pointer to a servent structure for the
    first entry in the network services database for which
    the name matches name and the protocol matches proto.
    PREP: Close network services database
    PREP: Call setservent(1)
    PREP: Obtain name and protocol of second network service in database
    TEST: Call getservbyname for that network service
    TEST: servent structures compare equal
    ERROR: s_proto mismatch: expected tcp, received 1
    CLEANUP: Call endservent() to close network services database
    1 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We recommend this request be refused.

    The problem the submitter reports does exist. But we can
    not see how this will cause the test to fail.

    The test source line responsible for the ERROR message
    in the output above is

    if (strcmp(serv->s_proto, serv1->s_proto) != 0) {
    sprintf((char *)&ebuf[0], "ERROR: s_proto mismatch: \
    expected %s, received %s", \
    serv->s_proto, serv1->s_proto);
    tet_infoline(ebuf);
    tet_result(TET_FAIL);
    }

    serv is assigned by a call to getservent(). serv1 is assigned by
    a call to getservbyname(). If a common static servent structure
    is used the pointers returned by both routines will be identical.
    So serv == serv1 and serv->s_proto == serv1->s_proto. So the
    error reported above should never occur.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion
    This request is refused.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority