Random message corpus, v2
David Bremner
bremner at debian.org
Mon Aug 13 13:13:45 PDT 2012
This obsoletes the series
id:"1344190393-22497-1-git-send-email-david at tethera.net"
[Patch v2 1/6] hex-escape: (en|de)code strings to/from restricted
[Patch v2 2/6] test/hex-xcode: new test binary
[Patch v2 3/6] test/hex-escaping: new test for hex escaping routines
In order to avoid the problem of trashing people's terminals, the new
version hex escapes the files being compared. This brings in another
three patches from the previous dump-restore series, but we need them
anyway for the eventual new dump-restore format.
[Patch v2 4/6] test: add database routines for testing.
No changes since v1.
[Patch v2 5/6] test: add generator for random "stub" messages
- Simplified to have only two character classes.
- Fix bug with "stop - start" as opposed to "start - stop"
See id:"87393x3jz1.fsf at qmul.ac.uk"
[Patch v2 6/6] test: add broken roundtrip test
- use hexdump to encode non-ascii octets.
See id:"87zk6524f0.fsf at qmul.ac.uk"
- Both Mark and Jamie remarked on the use of 'test_expect_success'
Basically there are two styles of running tests, "git style" as
written here, or "notmuch style" using "test_begin_subtest". The
git style seems to be more robust against failure of intermediate
commands: for example, if the hex-xcode binary is missing, the
corresponding notmuch style test shows (wrongly) as fixed (see
also id:"1317317811-29540-1-git-send-email-thomas at schwinge.name" for
Thomas converting some notmuch style tests to git style).
Obviously the notmuch style is more pleasant to edit. Maybe there
is a way to make them more robust; something like "set -e".
Note that some failures still do not abort the test, because of a
missing "set -o pipefile". Setting this locally in a test seems
definitely wrong, but maybe it should be set globally in test-lib.sh
More information about the notmuch
mailing list