<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/14351">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">db_test: set timezone to work around mktime bug<br><br>Apply workaround for db_test failure on ubuntu 19.04 in OBS. When the<br>timezone is set to UTC (default in OBS), and the glibc version is 2.29,<br>the test case is failing sometimes (not always) with the following<br>errors in the test log:<br><br>DAUC Cannot convert LU timestamp '2019-05-26 03:05:03' to time_t: Value too large for defined<br><br>Force the timezone to be CET when running the test, so it passes again.<br>I found this workaround in a Fedora bugreport [1], and tested with an<br>ubuntu 19.04 system running in docker, that setting the environment<br>variable like this makes the test pass 25 times in a row. Without it, it<br>fails every two or three times. Then I verified in my OBS namespace,<br>that the test also passes in OBS again.<br><br>[1] https://bugzilla.redhat.com/show_bug.cgi?id=1653340<br><br>Related: OS#4026<br>Change-Id: Ic8080ba1914bb364169ab0c563b132a4ab9a9aab<br>---<br>M tests/testsuite.at<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/testsuite.at b/tests/testsuite.at</span><br><span>index 70ae7ae..7d268d1 100644</span><br><span>--- a/tests/testsuite.at</span><br><span>+++ b/tests/testsuite.at</span><br><span>@@ -29,10 +29,12 @@</span><br><span> AT_CHECK([$abs_top_builddir/tests/gsup_server/gsup_server_test], [], [expout], [experr])</span><br><span> AT_CLEANUP</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+# TZ=CET: workaround for glibc bug in mktime() (https://osmocom.org/issues/4026):</span><br><span style="color: hsl(120, 100%, 40%);">+# "Cannot convert LU timestamp '2019-05-26 03:05:03' to time_t: Value too large for defined data type"</span><br><span> AT_SETUP([db])</span><br><span> AT_KEYWORDS([db])</span><br><span> cat $abs_srcdir/db/db_test.ok > expout</span><br><span> cat $abs_srcdir/db/db_test.err > experr</span><br><span> sqlite3 db_test.db < $abs_top_srcdir/sql/hlr.sql</span><br><span style="color: hsl(0, 100%, 40%);">-AT_CHECK([$abs_top_builddir/tests/db/db_test], [], [expout], [experr])</span><br><span style="color: hsl(120, 100%, 40%);">+AT_CHECK([TZ=CET $abs_top_builddir/tests/db/db_test], [], [expout], [experr])</span><br><span> AT_CLEANUP</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-hlr/+/14351">change 14351</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-hlr/+/14351"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic8080ba1914bb364169ab0c563b132a4ab9a9aab </div>
<div style="display:none"> Gerrit-Change-Number: 14351 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>