Menu

#118 test failures with GCC 4.6

autoopts
closed
autoopts (39)
5
2012-09-14
2011-04-08
No

The format for warnings changed in GCC 4.6, causing a false failure in the testsuite. The name of the flag that triggered the warning is now appended to the warning itself.

cond-> diff cond-cc.log cond-xx.log
cond-> failure 'warning diffs: 1c1
< #warning undefining SECOND due to option name conflict [-Wcpp]


warning undefining SECOND due to option name conflict'

cond-failure> trap '' 15
cond-failure> :
cond-failure> cd /var/tmp/portage/sys-devel/autogen-5.11.6/work/autogen-5.11.6/autoopts/test/testdir
cond-failure> test -d ../FAILURES
cond-failure> mkdir ../FAILURES
cond-failure> exec
cond-failure> for f in 'core'
cond-failure> test -f 'core
'
cond-failure> echo FAILURE: 'warning diffs: 1c1
< #warning undefining SECOND due to option name conflict [-Wcpp]


warning undefining SECOND due to option name conflict'

FAILURE: warning diffs: 1c1
< #warning undefining SECOND due to option name conflict [-Wcpp]


warning undefining SECOND due to option name conflict

cond-failure> exit 1
FAIL: cond.test

(autogen-5.11.6)

Discussion

  • Bruce Korb

    Bruce Korb - 2011-04-08

    Thank you. Will be fixed in next release.
    Meanwhile, the message gets extracted with "sed", so you can either disable the test
    or tweak the sed script to remove anything after "option name conflict". That is
    what I have actually done:

    ( eval echo ${cc_cmd} | \ ${SED} 's/-Werror//;s/-DTEST_TEST/-DSECOND -DTEST_TEST/' 2>&1 ) \ | ${SED} -n 's/^# //;s/ option name conflict.//p' > ${testname}-cc.log

    wmsg=cat ${testname}-cc.log
    test "X${wmsg}" = "Xwarning undefining SECOND due to" || \ failure "warning mismatch: $wmsg"

     
  • Bruce Korb

    Bruce Korb - 2011-04-08

    Someday, I'm going to learn to not post until I'm done testing easy fixes:

    ( eval echo ${cc_cmd} | \ ${SED} 's/-Werror//;s/-DTEST_TEST/-DSECOND -DTEST_TEST/' 2>&1 ) \ | ${SED} -n '/undefining SECOND due to option name conflict/p' \ > ${testname}-cc.log

    test -s ${testname}-cc.log || \ failure "warning diffs: 'undefining SECOND' not found"

     
  • dirtyepic @ gentoo

    Thanks, confirmed.

     
  • Bruce Korb

    Bruce Korb - 2012-01-27

    Fixed.

     

Log in to post a comment.