From 76a005507f284e874eb5a3e4e315bb324fb2a095 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 24 Feb 2022 23:09:14 +0100 Subject: Split interimap and pullimap test suites. --- Changelog | 1 + Makefile | 23 +++++++++++++----- tests/interimap.list | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/list | 66 ---------------------------------------------------- tests/pullimap.list | 2 ++ tests/run-all | 3 ++- 6 files changed, 85 insertions(+), 73 deletions(-) create mode 100644 tests/interimap.list delete mode 100644 tests/list create mode 100644 tests/pullimap.list diff --git a/Changelog b/Changelog index 9549892..cad321b 100644 --- a/Changelog +++ b/Changelog @@ -15,6 +15,7 @@ interimap (0.5.7) upstream; foo`; what's been built with `INTERIMAP_I=./lib INTERIMAP_PATH=./build ./tests/run foo`, and what's installed with `INTERIMAP_I="" INTERIMAP_PATH=/usr/bin tests/run foo`. + * Split interimap and pullimap test suites. + Improve message for missing untagged UIDNEXT responses, which we require but are omitted from some servers. + tests/tls-protocols: downgrade OpenSSL security level to 0, which is diff --git a/Makefile b/Makefile index 7bcda70..1d09ff2 100644 --- a/Makefile +++ b/Makefile @@ -40,13 +40,20 @@ $(SERVICE_FILES): $(builddir)/%.service: $(srcdir)/%.service @mkdir -vp $(dir $@) sed "s|@bindir@|$(bindir)|" <"$<" >"$@" -check: $(PROGRAMS) +testcerts: $(srcdir)/tests/certs/generate - INTERIMAP_I=$(srcdir)/lib INTERIMAP_PATH=$(builddir) $(srcdir)/tests/run-all -installcheck: - $(srcdir)/tests/certs/generate - INTERIMAP_I="" INTERIMAP_PATH=$(bindir) $(srcdir)/tests/run-all +check: check-interimap check-pullimap +check-interimap: $(builddir)/interimap testcerts + INTERIMAP_I=$(srcdir)/lib INTERIMAP_PATH=$(builddir) $(srcdir)/tests/run-all interimap.list +check-pullimap: $(builddir)/pullimap testcerts + INTERIMAP_I=$(srcdir)/lib INTERIMAP_PATH=$(builddir) $(srcdir)/tests/run-all pullimap.list + +installcheck: installcheck-interimap installcheck-pullimap +installcheck-interimap: testcerts + INTERIMAP_I="" INTERIMAP_PATH=$(bindir) $(srcdir)/tests/run-all interimap.list +installcheck-pullimap: testcerts + INTERIMAP_I="" INTERIMAP_PATH=$(bindir) $(srcdir)/tests/run-all pullimap.list release: @if ! git -C $(srcdir) diff --quiet HEAD -- Changelog interimap pullimap lib/Net/IMAP/InterIMAP.pm; then \ @@ -103,4 +110,8 @@ clean: rm -vf -- $(srcdir)/tests/certs/*.key $(srcdir)/tests/certs/*.crt $(srcdir)/tests/certs/*.pem -rmdir -vp --ignore-fail-on-non-empty -- $(builddir)/doc -.PHONY: all all-nodoc manual html doc check release install install-nodoc installcheck uninstall clean +.PHONY: all all-nodoc manual html doc release testcerts \ + check check-interimap check-pullimap \ + install install-nodoc \ + installcheck installcheck-interimap installcheck-pullimap \ + uninstall clean diff --git a/tests/interimap.list b/tests/interimap.list new file mode 100644 index 0000000..559daed --- /dev/null +++ b/tests/interimap.list @@ -0,0 +1,63 @@ +db-no-create--watch `interimap --watch` refuses to create the database +db-exclusive-lock mutually exclusive DB access + +. DB schema upgrade (v0 -> v1) + db-upgrade-0-1 migrate + # may happen if the server(s) software or its configuration changed + db-upgrade-0-1-delim-mismatch abort on hierarchy delimiter mismatch + # foreign key checking was broken until v0.5 + db-migration-0-1-foreign-key-violation abort on foreign key contraint violation + +. Mailbox deletion + ... delete + +. Mailbox renaming + rename-exists-db abort if target exists in the DB + rename-exists-local abort if target exists locally + rename-exists-remote abort if target exists remotely + ... rename-simple + ... rename-inferiors + +# try values beyond the signed integer limit +largeint Large UIDVALIDITY/UIDNEXT/HIGHESTMODSEQ values + +. Mailbox synchronization + ... sync-mailbox-list + list-reference list-reference + list-mailbox list-mailbox = foo "foo bar" "f\\\"o\x21o.*" "f\0o\0o" + list-select-opts list-select-opts = SUBSCRIBED + ignore-mailbox ignore-mailbox = ^virtual(?:\x00|$) + delimiter-change doesn't choke on delimiter change + +resume Resume when aborted +repair --repair + +. Authentication + auth-sasl-plain AUTHENTICATE (SASL PLAIN) + auth-sasl-plain-no-ir AUTHENTICATE (SASL PLAIN, no SASL-IR) + auth-login LOGIN + auth-logindisabled LOGINDISABLED + auth-noplaintext abort when STARTTLS is not offered + preauth-plaintext abort on MiTM via PREAUTH greeting + +compress COMPRESS=DEFLATE +condstore CONDSTORE +split-set Split large sets to avoid extra-long command lines + +. SSL/TLS + starttls-logindisabled LOGINDISABLED STARTTLS + starttls STARTTLS + starttls-injection STARTTLS response injection + tls SSL/TLS handshake + ... tls-verify-peer + tls-pin-fingerprint pubkey fingerprint pinning + tls-rsa+ecdsa pubkey fingerprint pinning for dual-cert RSA+ECDSA + tls-sni TLS servername extension (SNI) + tls-protocols force TLS protocol versions + tls-ciphers force TLS cipher list/suites + +. Live synchronization (60s) + sync-live local/remote simulation + sync-live-crippled local/remote simulation (crippled remote) + sync-live-tls local/remote simulation (TLS remote) + sync-live-multi local/remote1+remote2+remote3 simulation (3 local namespaces) diff --git a/tests/list b/tests/list deleted file mode 100644 index d1058ba..0000000 --- a/tests/list +++ /dev/null @@ -1,66 +0,0 @@ -db-no-create--watch `interimap --watch` refuses to create the database -db-exclusive-lock mutually exclusive DB access - -. DB schema upgrade (v0 -> v1) - db-upgrade-0-1 migrate - # may happen if the server(s) software or its configuration changed - db-upgrade-0-1-delim-mismatch abort on hierarchy delimiter mismatch - # foreign key checking was broken until v0.5 - db-migration-0-1-foreign-key-violation abort on foreign key contraint violation - -. Mailbox deletion - ... delete - -. Mailbox renaming - rename-exists-db abort if target exists in the DB - rename-exists-local abort if target exists locally - rename-exists-remote abort if target exists remotely - ... rename-simple - ... rename-inferiors - -# try values beyond the signed integer limit -largeint Large UIDVALIDITY/UIDNEXT/HIGHESTMODSEQ values - -. Mailbox synchronization - ... sync-mailbox-list - list-reference list-reference - list-mailbox list-mailbox = foo "foo bar" "f\\\"o\x21o.*" "f\0o\0o" - list-select-opts list-select-opts = SUBSCRIBED - ignore-mailbox ignore-mailbox = ^virtual(?:\x00|$) - delimiter-change doesn't choke on delimiter change - -resume Resume when aborted -repair --repair - -. Authentication - auth-sasl-plain AUTHENTICATE (SASL PLAIN) - auth-sasl-plain-no-ir AUTHENTICATE (SASL PLAIN, no SASL-IR) - auth-login LOGIN - auth-logindisabled LOGINDISABLED - auth-noplaintext abort when STARTTLS is not offered - preauth-plaintext abort on MiTM via PREAUTH greeting - -compress COMPRESS=DEFLATE -condstore CONDSTORE -split-set Split large sets to avoid extra-long command lines - -. SSL/TLS - starttls-logindisabled LOGINDISABLED STARTTLS - starttls STARTTLS - starttls-injection STARTTLS response injection - tls SSL/TLS handshake - ... tls-verify-peer - tls-pin-fingerprint pubkey fingerprint pinning - tls-rsa+ecdsa pubkey fingerprint pinning for dual-cert RSA+ECDSA - tls-sni TLS servername extension (SNI) - tls-protocols force TLS protocol versions - tls-ciphers force TLS cipher list/suites - -. Live synchronization (60s) - sync-live local/remote simulation - sync-live-crippled local/remote simulation (crippled remote) - sync-live-tls local/remote simulation (TLS remote) - sync-live-multi local/remote1+remote2+remote3 simulation (3 local namespaces) - -. pullimap - ... pullimap diff --git a/tests/pullimap.list b/tests/pullimap.list new file mode 100644 index 0000000..f4304b9 --- /dev/null +++ b/tests/pullimap.list @@ -0,0 +1,2 @@ +. pullimap + ... pullimap diff --git a/tests/run-all b/tests/run-all index d13f689..79e62d1 100755 --- a/tests/run-all +++ b/tests/run-all @@ -24,6 +24,7 @@ export PATH BASEDIR="$(dirname -- "$0")" RUN="$BASEDIR/run" +list="$1" failed=0 @@ -54,7 +55,7 @@ while IFS="" read -r x; do fi INDENT="$indent" "$RUN" "$t" ${desc+"$desc"} || failed=$(( failed+1 )) -done <"$BASEDIR/list" +done <"$BASEDIR/$list" if [ $failed -eq 0 ]; then printf "All tests passed.\\n" -- cgit v1.2.3