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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2273 Actions


    Problem Report Number 2273
    Submitter's Classification Specification problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.1162
    Raised 2003-08-15 04:02
    Updated 2003-08-22 18:14
    Published 2003-08-22 18:14
    Product Standard Commands and Utilities V2 (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSC version 5.2.3
    Test Identification /tset/POSIX.shell/shell/sh_05.ex 357
    Specification Commands and Utilities Issue 4 Version 2
    Location in Spec see problem text
    Problem Summary bitwise complement of signed values is platform-specific
    Problem Text /tset/POSIX.shell/shell/sh_05.ex 357 is failing on our platform.

    200|1 72 14:11:25|TP Start
    520|1 72 16908347 1 1|Assertion #357 (A): arthimetic expansion
    according to the rules for Arithmetic Precision and Operations
    520|1 72 16908347 2 1|Command failed: '([ $((~-11)) -eq 10 ])'
    220|1 72 1 14:11:26|FAIL
    410|1 357 1 14:11:26|IC End


    Our implementation specific behaviour is as follows:

    $ echo $((~-
    11))
    FSUM6659 syntax error in arithmetic
    expression "/vsc/VSC5.2.3/vsc/tset/POSIX.cmd/chgrp" near /v



    The UNIX95 spec states in section 2.6.4 Arithmetic Expansion (page 38)

    "... the shell will treat this as an arithmetic expression and
    substitute the value of the expression.
    The arithmetic expression will be processed according to the rules of
    the ISO C standard, with the
    following exceptions:
    - Only integer arithmetic is required.
    - The sizeof() operator and the prefix and postfix ++ and --
    operators are not required.
    - Selection, iteration and jump statements are not supported."


    The ISO C Standard states

    [#4] Some operators (the unary operator ~, and the binary
    operators <<, >>, &, ^, and |, collectively described as
    bitwise operators) are required to have operands that have
    integer type. These operators return values that depend on
    the internal representations of integers, and have
    implementation-defined and undefined aspects for signed
    types.


    Therefore bitwise complement of signed values is platform-specific.
    Test Output 200|1 72 14:11:25|TP Start
    520|1 72 16908347 1 1|Assertion #357 (A): arthimetic expansion
    according to the rules for Arithmetic Precision and Operations
    520|1 72 16908347 2 1|Command failed: '([ $((~-11)) -eq 10 ])'
    220|1 72 1 14:11:26|FAIL
    410|1 357 1 14:11:26|IC End

    Review Information

    Review Type SA Review
    Start Date 2003-08-15 04:02
    Last Updated 2003-08-20 02:02
    Completed 2003-08-20 02:02
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion The submitters argument has merit. Although this request was for a
    PIN/TIN, we have decided to classify this PR as a TSD. The test for ~-
    11 is not portable, as it assumes a two's complement integer
    representation. Thus that part of the test should be removed.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority