After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772662 - Test failures on current maint branch
Test failures on current maint branch
Status: RESOLVED NOTABUG
Product: GnuCash
Classification: Other
Component: Engine
git-maint
Other Linux
: Normal normal
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2016-10-09 19:04 UTC by Geert Janssens
Modified: 2018-06-29 23:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Geert Janssens 2016-10-09 19:04:30 UTC
While testing fixes for the sometimes failing test-report-utilities, I have been running lots of "make check" commands with different timezones set (by exporting the TZ environment variable).

I run into a number of test failures in the qof test suite when using timezones of TZ=GMT+11 or TZ=GMT+12 (is that supposed to be a valid timezone like for New Zealand with DST ?).

Each of them fails at a different point. Here's the summary:

1. With TZ=GMT+11
Failing test: test_gnc_print_date
This error is printed in between the test results:
ERROR:/kobaltnet/janssege/Development/gnucash/gnucash/src/libqof/qof/test/test-gnc-date.c:1338:test_gnc_print_date: assertion failed (gnc_print_date (tm1) == "23/11/1974"): ("22/11/1974" == "23/11/1974")

2. With TZ=GMT+12
Failing test: test_gnc_dmy2timespec_neutral
This error is printed in between the test results:
ERROR:/kobaltnet/janssege/Development/gnucash/gnucash/src/libqof/qof/test/test-gnc-date.c:1987:test_gnc_dmy2timespec_neutral: assertion failed (r_t.tv_sec == t.tv_sec): (932561940 == 932554740)
Comment 1 John Ralls 2016-10-09 19:48:59 UTC
NZST is GMT+12, NZDT is GMT+13. That's why the base time needs to be 10:59, so that 10:59 + 13 = 23:59, still the same day.

Interesting. I built with cmake + ninja and got clean tests on all TZs, albeit with OS X rather than Linux. While I think I'll leave this until I can test more thoroughly, I'd like to know if you get different test results with cmake & ninja from autotools.
Comment 2 Geert Janssens 2016-10-09 21:14:38 UTC
I'll try that build tomorrow
Comment 3 Geert Janssens 2016-10-10 12:08:15 UTC
Hmm, what's the procedure to build with ninja ? I have run cmake which gives me makefiles to work with, so I'm still using make && make check.

I suppose ninja needs something else?

The cmake - makefiles combination still breaks for TZ=GMT+11
Comment 4 Geert Janssens 2016-10-10 14:47:24 UTC
Ok, false alert.

TZ=abc+11 actually means we're testing for timezone UTC-11. That's the one timezoe we are not guaranteeing consistent date behaviour to be able to correctly support DST in New Zealand (UTC+13).

So all works as expected.
Comment 5 John Ralls 2018-06-29 23:51:29 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=772662. Please update any external references or bookmarks.