Skip to content

FileFormatTest: Provide data to MOC for big endian tests#2479

Open
pkturner wants to merge 1 commit intoOpenOrienteering:masterfrom
pkturner:endian_fileformat_test
Open

FileFormatTest: Provide data to MOC for big endian tests#2479
pkturner wants to merge 1 commit intoOpenOrienteering:masterfrom
pkturner:endian_fileformat_test

Conversation

@pkturner
Copy link
Contributor

This addresses #2473 (file_format_t fails on s390x). The ocdTextSymbolTest and ocdAreaSymbolTests had been created with 0 rows on big endian systems, which was causing a fatal error in QTest::fetchData.

"Test data requested, but no testdata available."

The understandsTest test already had a technique for skipping OCD test cases on big endian systems, so I applied the same in the ocdTextSymbolTest and ocdAreaSymbolTests, after removing the #ifdefs which were causing failure.

I don't have a big endian system at my disposal, so I forced the definition of the MAPPER_BIG_ENDIAN macro, first to duplicate the fatal error, then to validate the code change.

The ocdTextSymbolTest and ocdAreaSymbolTests had been created with
0 rows on big endian systems, which was causing a fatal error in
QTest::fetchData.
@dg0yt
Copy link
Member

dg0yt commented Feb 16, 2026

Thank you @pkturner.
There should be some s390x on build.opensuse.org, but I don't know which distro is available with our dependencies. openSUSE Tumbleweed complains:
https://build.opensuse.org/project/monitor/home:dg0yt?arch_s390x=1&defaults=0&repo_openSUSE_Tumbleweed=1&unresolvable=1

@lpechacek
Copy link
Member

openSUSE Tumbleweed complains

That's because NetCDF is not built for Z, therefore GDAL does not build. As a result, anything depending on GDAL does not build on Z either. I'm looking into a fix.

I've looked if other distros, .deb or .rpm based, can build Mapper on s390x, but all seem to be broken. Tumbleweed appears to be the easiest to fix.

As a side note, it's reportedly possible to gain access to System Z through LinuxONE project. I haven't tried LinuxONE myself yet, but if someone is interested in first-hand experience with that platform, it might be a way. Spoiler alert -- over SSH it looks like any other Linux instance.

@lpechacek
Copy link
Member

GDAL builds now for s390x in my staging. I've created a custom build of pkturner's submission in https://build.opensuse.org/package/show/home:LPechacek:oomapper/openorienteering-mapper-master (updated _service file to point to his Git repo).

The test results look better now but there are still glitches:

[  541s] test 15
[  541s]       Start 15: file_format_t
[  541s] 
[  541s] 15: Test command: /usr/bin/cmake "-P" "file_format_t-RUN.cmake"
[  541s] 15: Working Directory: /home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/build/test
[  541s] 15: Test timeout computed to be: 1500
[  541s] 15: ********* Start testing of FileFormatTest *********
[  541s] 15: Config: Using QtTest library 5.15.18, Qt 5.15.18 (s390x-big_endian-lp64 shared (dynamic) release build; by GCC 15.2.1 20251006), opensuse-tumbleweed 20260209
[  541s] 15: PASS   : FileFormatTest::initTestCase()
[  541s] 15: PASS   : FileFormatTest::mapCoordtoString(max,-1/0)
[  541s] 15: PASS   : FileFormatTest::mapCoordtoString(-2,max/1)
[  541s] 15: PASS   : FileFormatTest::mapCoordtoString(min,min/255)
[  541s] 15: PASS   : FileFormatTest::mapCoordFromString(plain)
[  541s] 15: PASS   : FileFormatTest::mapCoordFromString(multi ' ')
[  541s] 15: PASS   : FileFormatTest::mapCoordFromString(early \n)
[  541s] 15: PASS   : FileFormatTest::mapCoordFromString(late \r)
[  541s] 15: PASS   : FileFormatTest::fixupExtensionTest(file.omap)
[  541s] 15: PASS   : FileFormatTest::fixupExtensionTest(file)
[  541s] 15: PASS   : FileFormatTest::fixupExtensionTest(file.)
[  541s] 15: PASS   : FileFormatTest::fixupExtensionTest(file_omap)
[  541s] 15: PASS   : FileFormatTest::fixupExtensionTest(file.xmap)
[  541s] 15: PASS   : FileFormatTest::fixupExtensionTest(f.omap.zip)
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < xml legacy)
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < xml regular)
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < xml start)
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < xml incomplete 1)
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < xml incomplete 2)
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < '')
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < xml other)
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < 'OMAPxxx')
[  541s] 15: PASS   : FileFormatTest::understandsTest(XML < 0x0CADxxx)
[  541s] 15: XFAIL  : FileFormatTest::understandsTest(OCD < 0x0CADxxx) OCD format not support on big endian systems
[  541s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(739)]
[  541s] 15: PASS   : FileFormatTest::understandsTest(OCD < 0x0CADxxx)
[  541s] 15: XFAIL  : FileFormatTest::understandsTest(OCD < 0x0CAD) OCD format not support on big endian systems
[  541s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(739)]
[  541s] 15: PASS   : FileFormatTest::understandsTest(OCD < 0x0CAD)
[  541s] 15: XFAIL  : FileFormatTest::understandsTest(OCD < 0x0c) OCD format not support on big endian systems
[  541s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(739)]
[  541s] 15: PASS   : FileFormatTest::understandsTest(OCD < 0x0c)
[  541s] 15: XFAIL  : FileFormatTest::understandsTest(OCD < '') OCD format not support on big endian systems
[  541s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(739)]
[  541s] 15: PASS   : FileFormatTest::understandsTest(OCD < '')
[  541s] 15: XFAIL  : FileFormatTest::understandsTest(OCD < 'OMAPxxx') OCD format not support on big endian systems
[  541s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(739)]
[  541s] 15: PASS   : FileFormatTest::understandsTest(OCD < 'OMAPxxx')
[  541s] 15: XFAIL  : FileFormatTest::understandsTest(OCD < xml start) OCD format not support on big endian systems
[  541s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(739)]
[  541s] 15: PASS   : FileFormatTest::understandsTest(OCD < xml start)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < xml legacy)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < xml regular)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < xml start)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < xml incomplete 1)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < xml incomplete 2)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < '')
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < xml other)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < 'OMAPxxx')
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(XML < 0x0CADxxx)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(OCD < 0x0CADxxx)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(OCD < 0x0CAD)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(OCD < 0x0c)
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(OCD < '')
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(OCD < 'OMAPxxx')
[  541s] 15: PASS   : FileFormatTest::formatForDataTest(OCD < xml start)
[  541s] 15: ERROR 4: map.osm: No such file or directory
[  541s] 15: PASS   : FileFormatTest::issue_513_high_coordinates(testdata:issue-513-coords-outside-printable.xmap)
[  541s] 15: ERROR 4: map.osm: No such file or directory
[  541s] 15: PASS   : FileFormatTest::issue_513_high_coordinates(testdata:issue-513-coords-outside-printable.omap)
[  541s] 15: ERROR 4: map.osm: No such file or directory
[  541s] 15: PASS   : FileFormatTest::issue_513_high_coordinates(testdata:issue-513-coords-outside-qint32.omap)
[  541s] 15: PASS   : FileFormatTest::saveAndLoad(data:barrier.omap <> XML)
[  541s] 15: PASS   : FileFormatTest::saveAndLoad(data:rotated.omap <> XML)
[  541s] 15: PASS   : FileFormatTest::saveAndLoad(data:tags.omap <> XML)
[  541s] 15: PASS   : FileFormatTest::saveAndLoad(data:text-object.omap <> XML)
[  541s] 15: PASS   : FileFormatTest::saveAndLoad(data:undo.omap <> XML)
[  541s] 15: PASS   : FileFormatTest::saveAndLoad(data:/examples/complete map.omap <> XML)
[  541s] 15: PASS   : FileFormatTest::saveAndLoad(data:/examples/forest sample.omap <> XML)
[  541s] 15: PASS   : FileFormatTest::saveAndLoad(data:/examples/overprinting.omap <> XML)
[  542s] 15: PASS   : FileFormatTest::saveAndLoad(testdata:templates/world-file.xmap <> XML)
[  542s] 15: PASS   : FileFormatTest::saveAndLoad(data:undefined-objects.omap <> XML)
[  542s] 15: PASS   : FileFormatTest::pristineMapTest()
[  542s] 15: ERROR 6: Field of name 'Name' is not supported in GPX schema. Use GPX_USE_EXTENSIONS creation option to allow use of the <extensions> element.
[  542s] 15: ERROR 6: Field of name 'Name' is not supported in GPX schema. Use GPX_USE_EXTENSIONS creation option to allow use of the <extensions> element.
[  542s] 15: ERROR 6: Geometry type of `Polygon' not supported in GPX.
[  542s] 15: 
[  542s] 15: PASS   : FileFormatTest::ogrExportTest(complete map)
[  542s] 15: PASS   : FileFormatTest::kmlCourseExportTest()
[  542s] 15: PASS   : FileFormatTest::iofCourseExportTest()
[  542s] 15: PASS   : FileFormatTest::importTemplateTest(Course Design)
[  542s] 15: PASS   : FileFormatTest::ocdTextExportTest(0 chars)
[  542s] 15: PASS   : FileFormatTest::ocdTextExportTest(3 chars)
[  542s] 15: PASS   : FileFormatTest::ocdTextExportTest(4 chars)
[  542s] 15: PASS   : FileFormatTest::ocdTextExportTest(7 chars)
[  542s] 15: PASS   : FileFormatTest::ocdTextExportTest(8 chars)
[  542s] 15: PASS   : FileFormatTest::ocdTextExportTest(5+Yee)
[  542s] 15: PASS   : FileFormatTest::ocdTextExportTest(6+Yee)
[  542s] 15: PASS   : FileFormatTest::ocdTextExportTest(7+Yee)
[  542s] 15: PASS   : FileFormatTest::ocdTextImportTest(0 from 0)
[  542s] 15: PASS   : FileFormatTest::ocdTextImportTest(0 from 5)
[  542s] 15: FAIL!  : FileFormatTest::ocdTextImportTest(13 from 13) 'ocd_v8_import.getObjectText(ocd_object).startsWith(expected)' returned FALSE. ()
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1329)]
[  542s] 15: FAIL!  : FileFormatTest::ocdTextImportTest(15 from 20) 'ocd_v8_import.getObjectText(ocd_object).startsWith(expected)' returned FALSE. ()
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1329)]
[  542s] 15: FAIL!  : FileFormatTest::ocdTextImportTest(16 from 20) 'ocd_v8_import.getObjectText(ocd_object).startsWith(expected)' returned FALSE. ()
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1329)]
[  542s] 15: FAIL!  : FileFormatTest::ocdTextImportTest(20 from 20) 'ocd_v8_import.getObjectText(ocd_object).startsWith(expected)' returned FALSE. ()
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1329)]
[  542s] 15: PASS   : FileFormatTest::ocdTextImportTest(\r\n)
[  542s] 15: FAIL!  : FileFormatTest::ocdTextImportTest(\r\n123) 'ocd_v8_import.getObjectText(ocd_object).startsWith(expected)' returned FALSE. ()
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1329)]
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(bezier, area)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(bezier, line)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(straight, area)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(straight, line)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(virtual gap, area)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(virtual gap, line)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(hole, area)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(hole, line)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(empty hole, area)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(empty hole, line)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(two empty holes, area)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(two empty holes, line)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(open areas with hole, area)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(open areas with hole, line)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(area with nested holes, area)
[  542s] 15: PASS   : FileFormatTest::ocdPathImportTest(area with nested holes, line)
[  542s] 15: XFAIL  : FileFormatTest::ocdAreaSymbolTest(OCD8) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1699)]
[  542s] 15: PASS   : FileFormatTest::ocdAreaSymbolTest(OCD8)
[  542s] 15: XFAIL  : FileFormatTest::ocdAreaSymbolTest(OCD9) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1699)]
[  542s] 15: PASS   : FileFormatTest::ocdAreaSymbolTest(OCD9)
[  542s] 15: XFAIL  : FileFormatTest::ocdAreaSymbolTest(OCD10) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1699)]
[  542s] 15: PASS   : FileFormatTest::ocdAreaSymbolTest(OCD10)
[  542s] 15: XFAIL  : FileFormatTest::ocdAreaSymbolTest(OCD11) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1699)]
[  542s] 15: PASS   : FileFormatTest::ocdAreaSymbolTest(OCD11)
[  542s] 15: XFAIL  : FileFormatTest::ocdAreaSymbolTest(OCD12) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1699)]
[  542s] 15: PASS   : FileFormatTest::ocdAreaSymbolTest(OCD12)
[  542s] 15: XFAIL  : FileFormatTest::ocdTextSymbolTest(OCD8) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1823)]
[  542s] 15: PASS   : FileFormatTest::ocdTextSymbolTest(OCD8)
[  542s] 15: XFAIL  : FileFormatTest::ocdTextSymbolTest(OCD9) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1823)]
[  542s] 15: PASS   : FileFormatTest::ocdTextSymbolTest(OCD9)
[  542s] 15: XFAIL  : FileFormatTest::ocdTextSymbolTest(OCD10) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1823)]
[  542s] 15: PASS   : FileFormatTest::ocdTextSymbolTest(OCD10)
[  542s] 15: XFAIL  : FileFormatTest::ocdTextSymbolTest(OCD11) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1823)]
[  542s] 15: PASS   : FileFormatTest::ocdTextSymbolTest(OCD11)
[  542s] 15: XFAIL  : FileFormatTest::ocdTextSymbolTest(OCD12) OCD format not support on big endian systems
[  542s] 15:    Loc: [/home/abuild/rpmbuild/BUILD/openorienteering-mapper-master-0.9.20260216-build/openorienteering-mapper-master-0.9.20260216/test/file_format_t.cpp(1823)]
[  542s] 15: PASS   : FileFormatTest::ocdTextSymbolTest(OCD12)
[  542s] 15: PASS   : FileFormatTest::dxfExportTest(export_one_layer_per_symbol = false)
[  542s] 15: PASS   : FileFormatTest::dxfExportTest(export_one_layer_per_symbol = true)
[  542s] 15: PASS   : FileFormatTest::shpExportTest(export_one_layer_per_symbol = false)
[  542s] 15: PASS   : FileFormatTest::shpExportTest(export_one_layer_per_symbol = true)
[  542s] 15: PASS   : FileFormatTest::cleanupTestCase()
[  542s] 15: Totals: 104 passed, 5 failed, 0 skipped, 0 blacklisted, 782ms
[  542s] 15: ********* Finished testing of FileFormatTest *********
[  542s] 15: CMake Error at file_format_t-RUN.cmake:35 (message):
[  542s] 15:   Test file_format_t failed: 5
[  542s] 15: 
[  542s] 15: 
[  542s] 15/30 Test #15: file_format_t ......................***Failed    0.86 sec

@pkturner
Copy link
Contributor Author

Thank you @lpechacek for testing my PR. Those glitches were present in issue #2473 and escaped my notice.

I will work on a change to make them EXPECTed FAILs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants