unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob abb547a4d9c42098d91c3462ad518423c5b7837f 1610 bytes (raw)
name: gnu/packages/patches/gnutls-fix-stale-test.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
A certificate used in the GnuTLS test suite has expired, causing the
test suite to fail.

The effect of this patch depends on whether or not the datefudge program
is available. If it is, then it is used to change the date in the test
environment. If it is not, then the test is skipped.

At the time this patch was added to Guix, datefudge was not available,
so the test is skipped.

Taken from upstream commit:
https://gitlab.com/gnutls/gnutls/commit/47f25d9e08d4e102572804a2aed186b01db23c65

From 47f25d9e08d4e102572804a2aed186b01db23c65 Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <nmav@redhat.com>
Date: Wed, 29 Jun 2016 17:31:13 +0200
Subject: [PATCH] tests: use datefudge in name-constraints test

This avoids the expiration of the used certificate to affect the test.
---
 tests/cert-tests/name-constraints | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tests/cert-tests/name-constraints b/tests/cert-tests/name-constraints
index 05d6e9b..59af00f 100755
--- a/tests/cert-tests/name-constraints
+++ b/tests/cert-tests/name-constraints
@@ -28,7 +28,18 @@ if ! test -z "${VALGRIND}"; then
 fi
 TMPFILE=tmp.$$.pem
 
-${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem"
+export TZ="UTC"
+
+# Check for datefudge
+TSTAMP=`datefudge -s "2006-09-23" date -u +%s || true`
+if test "$TSTAMP" != "1158969600"; then
+	echo $TSTAMP
+	echo "You need datefudge to run this test"
+	exit 77
+fi
+
+datefudge -s "2016-04-22" \
+	${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem"
 rc=$?
 
 if test "${rc}" != "0"; then
-- 
2.9.1


debug log:

solving abb547a ...
found abb547a in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).