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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1589 Actions


    Problem Report Number 1589
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0146
    Raised 1995-11-07 08:00
    Updated 2003-03-13 08:00
    Published 1995-11-13 08:00
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.1.0
    Test Identification CAPI.hdr/misc/stat 1 and 2
    Specification System Interfaces and Libraries Issue 4 Version 2
    Location in Spec See Problem Text
    Problem Summary PIN4U.00012 The test may fail on implementations where st_blksize and st_blocks are defined as blksize_t and blkcnt_t respectively.
    Problem Text
    The test may fail on implementations where st_blksize and st_blocks
    are defined as blksize_t and blkcnt_t respectively.

    This has already been approved as base resolution 1170/109.
    -----------------------------------------------------------

    The stat structure is defined in the XSH4 Issue 2 specification to
    include at least the following members:

    dev_t st_dev ID of device containing file
    ino_t st_ino file serial number
    mode_t st_mode mode of file (see below)
    nlink_t st_nlink number of links to the file
    uid_t st_uid user ID of file
    gid_t st_gid group ID of file
    EX
    dev_t st_rdev device ID
    off_t st_size file size in bytes
    time_t st_atime time of last access
    time_t st_mtime time of last data modification
    time_t st_ctime time of last status change
    UX
    long st_blksize I/O block size
    long st_blocks number of blocks

    On our system, an LP64 implementation where long and pointers are 64
    bit data types, our definition of the st_blksize and st_blocks
    structure members were explicitly defined to be 32 bit elements, as to
    provide interoperability and media compatibility with the existing 32
    bit architectures.

    Changing these two structure member definitions as per the
    specification will break our binary compatibility heavily.

    We object to the st_blksize and st_blocks elements in the stat
    structure being defined as elements of type long, as these definitions
    do not protect and take into consideration 64 bit implementations.

    We therefore recommend that the structure stat elements st_blksize and
    st_blocks type definitions be changed from long to item specific
    integral opaque types; possibly blksize_t and blkcnt_t. Both of these
    structure elements are both defined as being filesystem-specific which
    is an implementation detail and in some respects beyond the purview of
    the specification.

    Proposed change:

    UX
    blksize_t st_blksize I/O block size
    blkcnt_t st_blocks number of blocks

    While we realize that the existing SVID definition for these elements
    are as type long since the st_blksize element is dependent upon the
    implementation of the filesystem and the st_blocks element is derived
    from st_blksize, it would be appropriate for these to be hidden as
    architecture specific. It should also be noted that these are the
    only elements of the stat structure that are not presented as opaque
    types. Making these elements item specific opaque types in defiance
    of established practices is defensible by the definition of the
    in_addr_t and in_port_t types, that were established for support of
    AF_INET in the sockets specification, historically these were defined
    as simple integral types.

    While this modification may raise objections of source compatibility
    we hold that this is not the case. Since these would be new types,
    the underlying element size can be defined to match the original type.

    This modified definition of the stat structure will maintain binary
    compatibility and will enhance portability across platforms, the major
    goal of the specification.
    Test Output
    TEST CASE: sys/stat.h

    TEST PURPOSE #1
    The structure stat shall be defined in sys/stat.h and
    contain the member st_blksize which shall be of type
    long.
    TEST: Size
    ERROR: expected size of st_blksize member to be 8, is 4
    TEST: Signed
    ERROR: expected st_blksize member to be signed, is unsigned
    1 FAIL

    TEST PURPOSE #2
    The structure stat shall be defined in sys/stat.h and
    contain the member st_blocks which shall be of type
    long.
    TEST: Size
    ERROR: expected size of st_blocks member to be 8, is 4
    TEST: Signed
    2 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    A permanent interpretation is recommended.

    We believe this change will have little effect on source portability.

    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