Menu

Test failures on 32-bit platforms with cppcheck 2.19.0

3 days ago
3 days ago
  • Moritz Haase

    Moritz Haase - 3 days ago

    Hi,

    I'm observing three different test failures while trying to upgrade Alpine Linux's cppcheck package from 2.18.3 to 2.19.0. Only the 32-bit platforms (x86, armv7, armhf) are affected.

    test/testcondition.cpp:2638(TestCondition::oppositeInnerConditionEmpty)
    test/test64bit.cpp:107(Test64BitPortability::functionpar)
    test/test64bit.cpp:258(Test64BitPortability::returnIssues)
    

    Full output of the failing assertions is:

    [...]/cppcheck/src/cppcheck-2.19.0/test/testcondition.cpp:2638(TestCondition::oppositeInnerConditionEmpty): Assertion failed. 
    Expected: 
    [test.cpp:1:45] -> [test.cpp:1:60]: (style) Condition 's.empty()' is always false [knownConditionTrueFalse]\n
    Actual: 
    [test.cpp:1:47]: (style) Comparing expression of type 'unsigned long' against value 0. Condition is always false. [compareValueOutOfTypeRangeError]\n
    [test.cpp:1:45] -> [test.cpp:1:60]: (style) Condition 's.empty()' is always false [knownConditionTrueFalse]\n
    
    [...]/cppcheck/src/cppcheck-2.19.0/test/test64bit.cpp:107(Test64BitPortability::functionpar): Assertion failed. 
    Expected: 
    [test.cpp:4:5]: (portability) Returning an address value in a function with integer return type is not portable. [CastAddressToIntegerAtReturn]\n
    Actual: 
    _____
    [...]/cppcheck/src/cppcheck-2.19.0/test/test64bit.cpp:258(Test64BitPortability::returnIssues): Assertion failed. 
    Expected: 
    [test.cpp:2:5]: (portability) Returning an address value in a function with integer return type is not portable. [CastAddressToIntegerAtReturn]\n
    Actual: 
    

    Full logs are available at:
    - https://gitlab.alpinelinux.org/moha/aports/-/jobs/2148642
    - https://gitlab.alpinelinux.org/moha/aports/-/jobs/2148637
    - https://gitlab.alpinelinux.org/moha/aports/-/jobs/2148636

    Could you confirm that those tests are known to pass for 32-bit (musl-based) platforms?

    Thanks,

    Moritz

     
  • CHR

    CHR - 3 days ago

    Unfortunately we haven't been able to test 32-bit builds in our CI for a while now. Those tests indeed fail on a 32-bit platform.

     

Log in to post a comment.