Closed tsteven4 closed 10 months ago
Bug demo. This runs the new test against the code without the fix to gpx.cc (from c6689168)
Running gpx.test
--- ./reference/gpxpassthrough10~gpx.gpx 2023-10-26 13:48:02.152519577 -0600
+++ /tmp/gpsbabel.56238/gpxpassthrough10~gpx.gpx 2023-10-26 13:48:22.840263458 -0600
@@ -24,7 +24,6 @@
<rte>
<name>Low Road</name>
<desc>Generated from track Route</desc>
- <foreign:something>rte</foreign:something>
<rtept lat="36.339560000" lon="-117.422570000">
<ele>479.300</ele>
<name>RPT001</name>
@@ -41,7 +40,6 @@
</rte>
<trk>
<name>meridian</name>
- <foreign:something>trk</foreign:something>
<trkseg>
<trkpt lat="30.062183333" lon="-91.610350000">
<ele>1.000</ele>
@@ -55,6 +53,7 @@
<trkpt lat="30.062700000" lon="-91.608266667">
<ele>0.000</ele>
<time>2002-05-25T17:12:00.200Z</time>
+ <foreign:something>eof</foreign:something>
</trkpt>
</trkseg>
</trk>
ERROR comparing ./reference/gpxpassthrough10~gpx.gpx /tmp/gpsbabel.56238/gpxpassthrough10~gpx.gpx
--- ./reference/gpxpassthrough11~gpx.gpx 2023-10-26 13:48:02.152519577 -0600
+++ /tmp/gpsbabel.56238/gpxpassthrough11~gpx.gpx 2023-10-26 13:48:22.850277205 -0600
@@ -15,9 +15,7 @@
<name>Turn right at Airport Rd</name>
<cmt>Turn right at Airport Rd</cmt>
<desc>Turn right at Airport Rd</desc>
- <extensions>
<foreign:something>wpt</foreign:something>
- </extensions>
</wpt>
<wpt lat="36.463640000" lon="-116.879200000">
<ele>-67.300</ele>
@@ -67,6 +65,12 @@
<trkpt lat="30.062700000" lon="-91.608266667">
<ele>0.000</ele>
<time>2002-05-25T17:12:00.200Z</time>
+ <extensions>
+ <foreign:something>trkseg</foreign:something>
+ </extensions>
+ <extensions>
+ <foreign:something>eof</foreign:something>
+ </extensions>
</trkpt>
</trkseg>
</trk>
ERROR comparing ./reference/gpxpassthrough11~gpx.gpx /tmp/gpsbabel.56238/gpxpassthrough11~gpx.gpx
All the new reference files have been validated against all used schema.
Coverage variation | Diff coverage |
---|---|
+0.03% | 73.33% |
These bugs exist for gpx 1.0 -> gpx 1.0 passthrough, and gpx 1.1 to gpx 1.1 passthrough. This work does not consider passthrough between different versions(#1194).
with gpx 1.0, any extension data that was a child of rte or trk was lost. I believe this used to work but has been broken for quite a while.
with gpx 1.0 extension data that was a child of gpx could be erroneously rewritten as part of the final wpt/rtept/trkpt.
with gpx 1.1 extension data that was a child of trkseg could be erroneously rewritten as part of the final wpt/rtept/trkpt.
with gpx 1.1 extension data that was a child of gpx could be erroneously rewritten as part of the final wpt/rtept/trkpt.
with gpx 1.1 extension data that was a child of waypoint and passed through would result in a schema violation, the required extension element was lost.
I note we currently drop any extension data that is a child of gpx, ,a child of trkseg, or a child of metadata.