Bug 376439 - Release 16.12.x on i386 tests TestDMS and TestCachingDms fails - other architectures all pass
Summary: Release 16.12.x on i386 tests TestDMS and TestCachingDms fails - other archit...
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jasem Mutlaq
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-13 11:05 UTC by Rik Mills
Modified: 2017-08-09 20:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rik Mills 2017-02-13 11:05:56 UTC
Release 16.12.x

Log from ubuntu autopkgtests

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-zesty/zesty/i386/k/kstars/20170212_223010_4b1bb@/log.gz

autopkgtest [22:29:58]: test testsuite: [-----------------------
	make -j1 test ARGS\+=-j1
Running tests...
/usr/bin/ctest --force-new-ctest-process -j1
Test project /tmp/autopkgtest.q3tI7p/build.iOZ/kstars-16.12.1/obj-i686-linux-gnu
    Start 1: CSVParserTest
1/5 Test #1: CSVParserTest ....................   Passed    0.07 sec
    Start 2: FixedWidthParserTest
2/5 Test #2: FixedWidthParserTest .............   Passed    0.03 sec
    Start 3: DMSTest
3/5 Test #3: DMSTest ..........................***Failed    0.00 sec
********* Start testing of TestDMS *********
Config: Using QtTest library 5.7.1, Qt 5.7.1 (i386-little_endian-ilp32 shared (dynamic) release build; by GCC 6.3.0 20170124)
PASS   : TestDMS::initTestCase()
PASS   : TestDMS::defaultCtor()
PASS   : TestDMS::explicitSexigesimalCtor()
FAIL!  : TestDMS::angleCtor() 'd.Hours() == (angle+360)/15.0' returned FALSE. ()
   Loc: [/tmp/autopkgtest.q3tI7p/build.iOZ/kstars-16.12.1/Tests/auxiliary/testdms.cpp(64)]
FAIL!  : TestDMS::stringCtor() 'h.Degrees() == d.Degrees()*15.0' returned FALSE. ()
   Loc: [/tmp/autopkgtest.q3tI7p/build.iOZ/kstars-16.12.1/Tests/auxiliary/testdms.cpp(84)]
PASS   : TestDMS::testReduceToRange()
PASS   : TestDMS::cleanupTestCase()
Totals: 5 passed, 2 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of TestDMS *********

    Start 4: TestCachingDms
4/5 Test #4: TestCachingDms ...................***Failed    0.06 sec
********* Start testing of TestCachingDms *********
Config: Using QtTest library 5.7.1, Qt 5.7.1 (i386-little_endian-ilp32 shared (dynamic) release build; by GCC 6.3.0 20170124)
PASS   : TestCachingDms::initTestCase()
PASS   : TestCachingDms::defaultCtor()
PASS   : TestCachingDms::explicitSexigesimalCtor()
PASS   : TestCachingDms::angleCtor()
FAIL!  : TestCachingDms::stringCtor() 'h.Degrees() == d.Degrees()*15.0' returned FALSE. ()
   Loc: [/tmp/autopkgtest.q3tI7p/build.iOZ/kstars-16.12.1/Tests/auxiliary/testcachingdms.cpp(110)]
PASS   : TestCachingDms::setUsing_atan2()
PASS   : TestCachingDms::setUsing_asin()
PASS   : TestCachingDms::setUsing_acos()
PASS   : TestCachingDms::additionOperator()
PASS   : TestCachingDms::subtractionOperator()
QDEBUG : TestCachingDms::unaryMinusOperator() -56.3
PASS   : TestCachingDms::unaryMinusOperator()
PASS   : TestCachingDms::testFailsafeUseOfBaseClassPtr()
PASS   : TestCachingDms::cleanupTestCase()
Totals: 12 passed, 1 failed, 0 skipped, 0 blacklisted, 52ms
********* Finished testing of TestCachingDms *********

    Start 5: TestSkyPoint
5/5 Test #5: TestSkyPoint .....................   Passed    0.03 sec

60% tests passed, 2 tests failed out of 5

Total Test time (real) =   0.20 sec

The following tests FAILED:
	  3 - DMSTest (Failed)
Comment 1 José Manuel Santamaría Lema 2017-02-16 18:35:23 UTC
For the record this patch we added in out packaging git solved it for me:
https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/kstars/commit/?id=e4aa0177a79f6750a64d2d1060e8d54da8a9fb6d

If it's ok we can send a more complete patch replacing the unsafe QVERIFY's with qFuzzyCompare's
Comment 2 José Manuel Santamaría Lema 2017-02-16 18:41:24 UTC
(In reply to José Manuel Santamaría Lema from comment #1)
> this patch we added in out packaging git

* in our packaging git repository

I would like to just drop a link to the documetation about the macro in question:
http://doc.qt.io/qt-5/qtglobal.html#qFuzzyCompare
Comment 3 Jasem Mutlaq 2017-02-16 18:43:21 UTC
Yes please the complete patch.
Comment 4 José Manuel Santamaría Lema 2017-02-18 13:50:56 UTC
https://phabricator.kde.org/D4659

By the way, the first patch is wrong. qFuzzyCompare() is a function returning a boolean and therefore it must be use _inside_ a QVERIFY
Comment 5 Csaba Kertész 2017-08-09 20:48:56 UTC
I adapted the patch to the latest source changes and the tests run successfully. The fix is pushed to master:

https://commits.kde.org/kstars/fa79fc4faf2c9810f849b980165b5dda0b33f8a3

Thanks for the contribution!