View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000229||file||General||public||2021-01-15 13:58||2021-02-09 11:26|
|Platform||VirtualBox image||OS||Ubuntu (Linux)||OS Version||16.04|
|Summary||0000229: fit-map-data.testfile does not match fit-map-data.result, thus file-5.39 compilation (Yocto 3.2.1) always fails!|
|Description||when building "file-5.39" in a Yocto-3.2.1 environment, its recipe always fails with the following error (excerpt):|
| Running test: ../../git/tests/fit-map-data.testfile
| Error: result was
| FIT Map data, unit id 65536, serial 3879446968, Sat May 31 12:00:34 2014, manufacturer 1 (garmin), product 1632, type 4 (Activity)
| FIT Map data, unit id 65536, serial 3879446968, Sat May 31 10:00:34 2014, manufacturer 1 (garmin), product 1632, type 4 (Activity)
| ../../git/tests/fit-map-data.testfile: FIT Map data, unit id 65536, serial 3879446968, Sat May 31 12:00:34 2014, manufacturer 1 (garmin), product 1632, type 4 (Activity)
I have tested "file" with the provided fit testdata (git/tests/fit-map-data.testfile) with two other versions of "file" (5.25 and 5.32) and both give the same result as in the Yocto build!
(i.e. NOT the expected result: the timestamp differs for 2 hours!)
please fix the expected result for the fit test.
|Steps To Reproduce||just execute: (in the file repo)|
this will produce:
fit-map-data.testfile: FIT Map data, unit id 65536, serial 3879446968, Sat May 31 12:00:34 2014, manufacturer 1 (garmin), product 1632, type 4 (Activity)
while the expected result for the automated test expects the timestamp to be "Sat May 31 10:00:34 2014" - 2 hours earlier
|Additional Information||I don't know-if(/think-that) this is related to the virtual box I am running Ubuntu-16.04 in, I have no other machine to test that;|
but the current time (output of the "time" command) is correct...
|Tags||No tags attached.|
the used commit for the file repo is: 87731415de945660b00f02207d8e9d986ef9b82e
||Exactly two hours? Smells like GMT vs local time conflict...|
Yeah - some timezone problem in our virtual-machine setup or alike - I meanwhile had the chance to run the "file" testsuite on a native Linux server, and there it worked!
BUT: why is the timezone even considered? shouldn't "file" simply read the absolute timestamp stored in that test-file and just display it?
I mean, if the local timezone is taken into consideration, wouldn't that require many "expected result" files then? one for every existing timezone in the world...
||The formats use FILE_T_LOCAL so they use localtime instead of gmtime. Perhaps they should not?|
||It is a timezone issue. Changing FILE_T_LOCAL to 0 in softmagic.c should fix it, but is this better (to print times in GMT by default)?|
Well, that file was generated at the displayed time, but in the timezone of the creator of the file, correct?
So when I look at the output, without any timezone information, it looks as if it was created in my local timezone...
Maybe show the timestamp converted to the local timezone - but in that case, testing would be horrible;
probably the better aproach: also show the timezone of the creator (if that info is available) or the timestamp relative to GMT as you suggested!
||It appears that the magic for the maps is written on purpose to use leldate (local) instead of ledate (UTC). I think the easiest way is to stick a TZ=UTC before running the tests.|
before running the test works for me, thank you very much!!!
I think you can close this ticket now, and sorry for even raising this - wasn't a "file" problem at all in the end...
|2021-01-15 13:58||JoergS||New Issue|
|2021-01-15 14:10||JoergS||Note Added: 0003528|
|2021-01-22 14:42||polluks||Note Added: 0003529|
|2021-01-25 07:43||JoergS||Note Added: 0003530|
|2021-02-05 22:03||christos||Note Added: 0003537|
|2021-02-05 22:04||christos||Assigned To||=> christos|
|2021-02-05 22:04||christos||Status||new => assigned|
|2021-02-05 22:04||christos||Status||assigned => feedback|
|2021-02-05 22:04||christos||Note Added: 0003538|
|2021-02-07 08:40||JoergS||Note Added: 0003551|
|2021-02-07 08:40||JoergS||Status||feedback => assigned|
|2021-02-08 14:52||christos||Note Added: 0003552|
|2021-02-09 11:26||JoergS||Note Added: 0003553|