summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-02-10 17:01:10 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2018-02-10 17:01:10 +0000
commit4e6ad671cb21180d13745c708021caa9ae086bb2 (patch)
tree8e96d438959c0d1dfbde772aeeb4eb9fc2aa03d7 /test
parent2be324ee17454ae5c5a32a3533aced861d103074 (diff)
Testsuite: move sha3 tests to separate testcase
Diffstat (limited to 'test')
l---------test/confs/29901
-rwxr-xr-xtest/runtest26
-rw-r--r--test/scripts/2000-GnuTLS/200013
-rw-r--r--test/scripts/2100-OpenSSL/210013
-rw-r--r--test/scripts/2990-sha3/299013
-rw-r--r--test/scripts/2990-sha3/REQUIRES1
-rw-r--r--test/stdout/200010
-rw-r--r--test/stdout/210010
-rw-r--r--test/stdout/299010
9 files changed, 51 insertions, 46 deletions
diff --git a/test/confs/2990 b/test/confs/2990
new file mode 120000
index 000000000..af2e09a3e
--- /dev/null
+++ b/test/confs/2990
@@ -0,0 +1 @@
+0000 \ No newline at end of file
diff --git a/test/runtest b/test/runtest
index c32222dc0..862eb07ae 100755
--- a/test/runtest
+++ b/test/runtest
@@ -3535,6 +3535,32 @@ DIR: for (my $i = 0; $i < @test_dirs; $i++)
{
if (!defined $parm_malware{$1}) { $wantthis = 0; last; }
}
+ elsif (/^feature (.*)$/)
+ {
+ # move to a subroutine?
+ my $eximinfo = "$parm_exim -C $parm_cwd/test-config -DDIR=$parm_cwd -bP macro $1";
+
+ open (IN, "$parm_cwd/confs/0000") ||
+ tests_exit(-1, "Couldn't open $parm_cwd/confs/0000: $!\n");
+ open (OUT, ">test-config") ||
+ tests_exit(-1, "Couldn't open test-config: $!\n");
+ while (<IN>)
+ {
+ do_substitute($testno);
+ print OUT;
+ }
+ close(IN);
+ close(OUT);
+
+ system($eximinfo . " >/dev/null 2>&1");
+ if ($? != 0) {
+ unlink("$parm_cwd/test-config");
+ $wantthis = 0;
+ $_ = "feature $1";
+ last;
+ }
+ unlink("$parm_cwd/test-config");
+ }
else
{
tests_exit(-1, "Unknown line in \"scripts/$testdir/REQUIRES\": \"$_\"");
diff --git a/test/scripts/2000-GnuTLS/2000 b/test/scripts/2000-GnuTLS/2000
index 8717892f2..a1299e574 100644
--- a/test/scripts/2000-GnuTLS/2000
+++ b/test/scripts/2000-GnuTLS/2000
@@ -13,16 +13,3 @@ exim -qf
****
killdaemon
no_msglog_check
-#
-#
-exim -be
-sha256: ${sha256:}
-sha256: ${sha256:abc}
-
-sha3: ${sha3:}
-sha3: ${sha3:abc}
-sha3_256: ${sha3_256:}
-sha3_256: ${sha3_256:abc}
-sha3_512: ${sha3_512:}
-sha3_512: ${sha3_512:abc}
-****
diff --git a/test/scripts/2100-OpenSSL/2100 b/test/scripts/2100-OpenSSL/2100
index 37ba66fb5..c2b0f8981 100644
--- a/test/scripts/2100-OpenSSL/2100
+++ b/test/scripts/2100-OpenSSL/2100
@@ -8,16 +8,3 @@ exim -qf
****
killdaemon
no_msglog_check
-#
-#
-exim -be
-sha256: ${sha256:}
-sha256: ${sha256:abc}
-
-sha3: ${sha3:}
-sha3: ${sha3:abc}
-sha3_256: ${sha3_256:}
-sha3_256: ${sha3_256:abc}
-sha3_512: ${sha3_512:}
-sha3_512: ${sha3_512:abc}
-****
diff --git a/test/scripts/2990-sha3/2990 b/test/scripts/2990-sha3/2990
new file mode 100644
index 000000000..e0d4aaf46
--- /dev/null
+++ b/test/scripts/2990-sha3/2990
@@ -0,0 +1,13 @@
+# sha3 expansions
+#
+exim -be
+sha256: ${sha256:}
+sha256: ${sha256:abc}
+
+sha3: ${sha3:}
+sha3: ${sha3:abc}
+sha3_256: ${sha3_256:}
+sha3_256: ${sha3_256:abc}
+sha3_512: ${sha3_512:}
+sha3_512: ${sha3_512:abc}
+****
diff --git a/test/scripts/2990-sha3/REQUIRES b/test/scripts/2990-sha3/REQUIRES
new file mode 100644
index 000000000..378d36d0b
--- /dev/null
+++ b/test/scripts/2990-sha3/REQUIRES
@@ -0,0 +1 @@
+feature _CRYPTO_HASH_SHA3
diff --git a/test/stdout/2000 b/test/stdout/2000
deleted file mode 100644
index 939df1b9e..000000000
--- a/test/stdout/2000
+++ /dev/null
@@ -1,10 +0,0 @@
-> sha256: E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
-> sha256: BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD
->
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
->
diff --git a/test/stdout/2100 b/test/stdout/2100
deleted file mode 100644
index f349c70be..000000000
--- a/test/stdout/2100
+++ /dev/null
@@ -1,10 +0,0 @@
-> sha256: E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
-> sha256: BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD
->
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
-> Failed: sha3 only supported with GnuTLS 3.5.0 + or OpenSSL 1.1.1 +
->
diff --git a/test/stdout/2990 b/test/stdout/2990
new file mode 100644
index 000000000..203cef932
--- /dev/null
+++ b/test/stdout/2990
@@ -0,0 +1,10 @@
+> sha256: E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
+> sha256: BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD
+>
+> sha3: A7FFC6F8BF1ED76651C14756A061D662F580FF4DE43B49FA82D80A4B80F8434A
+> sha3: 3A985DA74FE225B2045C172D6BD390BD855F086E3E9D525B46BFE24511431532
+> sha3_256: A7FFC6F8BF1ED76651C14756A061D662F580FF4DE43B49FA82D80A4B80F8434A
+> sha3_256: 3A985DA74FE225B2045C172D6BD390BD855F086E3E9D525B46BFE24511431532
+> sha3_512: A69F73CCA23A9AC5C8B567DC185A756E97C982164FE25859E0D1DCC1475C80A615B2123AF1F5F94C11E3E9402C3AC558F500199D95B6D3E301758586281DCD26
+> sha3_512: B751850B1A57168A5693CD924B6B096E08F621827444F70D884F5D0240D2712E10E116E9192AF3C91A7EC57647E3934057340B4CF408D5A56592F8274EEC53F0
+>