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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1590 Actions


    Problem Report Number 1590
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0147
    Raised 1995-10-26 08:00
    Updated 2003-03-13 08:00
    Published 1995-11-27 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 CAPI.os/time/getdate 44
    Specification System Interfaces and Libraries Issue 4 Version 2
    Location in Spec See Problem Text
    Problem Summary PIN4U.00013 the test may fail by returning an error 7.
    Problem Text
    The test assumes that if the file identified by the DATEMSK variable
    exists and contains invalid data that getdate_err will return a value of
    5 which is defined as:

    5 An error is encountered while reading the template file.

    This would imply that a file system I/O occured. We feel that the value 7
    which is defined as:

    7 There is no line in the template that matches the input.

    There is no definition of what the file looks like, so the string written
    is as valid as any other. The function check for a match and upon finding
    none set getdate_err to 7. I could see if there were a specified format
    for the contents of the file, if it was specified that no supported (since
    XSH4.2 does not preclude extensions to the mandatory list) field descriptors
    are found, or if there were a problem parcing the contents, then setting
    getdate_err to 5 would be valid.
    Test Output
    10|988 /tset/CAPIbase/fgetdate/fgetdate44 22:21:18|TC Start, scenario ref 1156-1
    15|988 1.10 1|TCM Start
    400|988 44 1 22:21:19|IC Start
    200|988 1 22:21:19|TP Start
    520|988 1 20667 1 1|SPEC1170TESTSUITE CASE 44
    520|988 1 20667 1 2|5 in getdate_err and return NULL on a call to struct
    520|988 1 20667 1 3|tm *getdate(char *string) when an error is encountered
    520|988 1 20667 1 4|while reading the template file.
    520|988 1 20668 1 1|PREP: Make DATEMSK refer to selected data file
    520|988 1 20668 1 2|TEST: getdate_err -> 5 and NULL returned
    520|988 1 20668 1 3|ERROR: Invalid getdate_err
    520|988 1 20668 1 4| Expected 5,Actual 7
    220|988 1 1 22:21:19|FAIL
    410|988 44 1 22:21:19|IC End
    80|988 0 22:21:19|TC End

    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 after review.

    Although the spec could be worded more clearly, we believe that
    getdate error 5 is the only error that should be returned when
    "An error is encountered while reading the template file". Since
    syntax errors, as well as I/O errors, may occur while reading the
    file, they belong to this error category too. No other category
    seems closely applicable.

    The spec wording regarding error 7 is clear. It is only used if
    "There is no line in the template that matches the input".
    Reporting syntax errors using this error would eliminate this
    clarity. Consider the case where a syntax error is encountered
    while reading a template file that contains a template that
    matches the input.

    We recommend that the getdate error 5 wording be changed from

    5 An error is encountered while reading the template file.

    to

    5 An error is encountered while scanning the template file.

    The submitter is correct in stating there is no definition of the
    format for templates in the template file. But we believe the
    test ignores this issue.

    The getdate spec states that

    The templates are contained in a text file identified by the
    environment variable DATEMSK.

    The XBD defines a text file as

    A file that contains characters organised into one or more lines.
    The lines must not contain NUL characters and none can exceed
    {LINE_MAX} bytes in length, including the newline character. ...

    The test template file uses a single template which contains NULL
    characters. By the definition above this template should be
    invalid. When the getdate function encounters these NULLs it
    should return an error 5.

    Although the issue wasn't raised as a part of the request we
    would add that error 4 is also not considered a valid error in
    this case. The getdate spec defines error 4 as

    4 The template file is not a regular file.

    Although the test template file is not a text file it does meet
    the XBD definition of a regular file.

    Review Type Expert Group Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    The Base WG resolved that the request should be granted. The specification
    is considered correct. Parsing errors are not required to return error
    code 5. This will be clarified in the next version of the specification.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion
    A Permanent Interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority