[gnutls-devel] [PATCH 4/4] tests: enforce UTC timezone in datefudge tests

Alon Bar-Lev alon.barlev at gmail.com
Sun Jun 21 02:00:05 CEST 2015


Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>
---
 tests/pkcs1-padding/pkcs1-pad   | 4 +++-
 tests/suite/testcompat-openssl  | 2 ++
 tests/suite/testcompat-polarssl | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/pkcs1-padding/pkcs1-pad b/tests/pkcs1-padding/pkcs1-pad
index 65b31fd..8d0861a 100755
--- a/tests/pkcs1-padding/pkcs1-pad
+++ b/tests/pkcs1-padding/pkcs1-pad
@@ -26,9 +26,11 @@ set -e
 srcdir="${srcdir:-.}"
 CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 
+export TZ="UTC"
+
 # Check for datefudge
 TSTAMP=`datefudge "2006-09-23" date -u +%s || true`
-if test "${TSTAMP}" != "1158962400"; then
+if test "${TSTAMP}" != "1158969600"; then
   echo "You need datefudge to run this test"
   exit 77
 fi
diff --git a/tests/suite/testcompat-openssl b/tests/suite/testcompat-openssl
index f82f00e..42b695d 100755
--- a/tests/suite/testcompat-openssl
+++ b/tests/suite/testcompat-openssl
@@ -44,6 +44,8 @@ else
   export FIPS=0
 fi
 
+export TZ="UTC"
+
 # Check for datefudge
 TSTAMP=`datefudge "2006-09-23 00:00 UTC" date -u +%s 2>/dev/null`
 if test "${TSTAMP}" != "1158969600"; then
diff --git a/tests/suite/testcompat-polarssl b/tests/suite/testcompat-polarssl
index fcaf99b..41dd59f 100755
--- a/tests/suite/testcompat-polarssl
+++ b/tests/suite/testcompat-polarssl
@@ -32,6 +32,8 @@
 
 srcdir="${srcdir:-.}"
 
+export TZ="UTC"
+
 # Check for datefudge
 TSTAMP=`datefudge "2006-09-23 00:00 UTC" date -u +%s 2>/dev/null`
 if test "${TSTAMP}" != "1158969600"; then
-- 
2.3.6




More information about the Gnutls-devel mailing list