[Pkg-mozext-maintainers] Bug#944216: enigmail: 6 errors in the unit test suite

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Nov 6 05:10:15 GMT 2019

Package: enigmail
Version: 2:2.1.3+ds1-1
Control: tags -1 + help

I've uploaded Enigmail 2.1.3 to debian unstable, but there are still a
handful of errors in the test suite when running the unit tests.

This bug report is meant to keep track of them, hopefully it will help
someoneā„¢ figure out where the problems are coming from as well.

The three problems each come in pairs of test failures, likely all to do
with the replacement of openpgp.js with GnuPG, which we're continuing to
do because OpenPGP.js appears to be unpackagable by debian (see

The issues are:

A) Something is wrong with the basic autocrypt test:

AssertionError: message is long enough - false == true - JS frame :: file:///home/dkg/src/enigmail/enigmail/package/tests/autocrypt-test.js :: shouldGetKeyFunctions/< :: line 187
AssertionError: this should not happen - "keyImportFailed" == 0 - JS frame :: file:///home/dkg/src/enigmail/enigmail/package/tests/autocrypt-test.js :: shouldGetKeyFunctions/< :: line 197

B) Minimal key export is different:

AssertionError: "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCg" == "xsDNBFub08oBDACmb04i4u8xUV1ADbnbN5l83mpr70OyWVJb5E" - JS frame :: file:///home/dkg/src/enigmail/enigmail/package/tests/keyObj-test.js :: shouldExportMinimalSubkey :: line 53
AssertionError: "U1Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" == "1MU0qOC5SusatWeaebL9igZMla4aqtnLyRwLcsKODSTaZXQw==" - JS frame :: file:///home/dkg/src/enigmail/enigmail/package/tests/keyObj-test.js :: shouldExportMinimalSubkey :: line 54

C) Some problem with Autocrypt setup message:

AssertionError: keys must not be null - null != null - JS frame :: file:///home/dkg/src/enigmail/enigmail/package/tests/autoSetup-test.js :: performAutocryptSetupTest :: line 606
RuntimeError: Caught unhandled exception: TypeError: keys is null - file:///home/dkg/src/enigmail/enigmail/package/tests/autoSetup-test.js ::  :: line 607
Stack: performAutocryptSetupTest at file:///home/dkg/src/enigmail/enigmail/package/tests/autoSetup-test.js:607:3
runTests at file:///home/dkg/src/enigmail/enigmail/package/tests/testHelper.js:77:31
executeScript at chrome://jsunit/content/modules/jsunit-main.jsm:214:29
do_subtest at chrome://jsunit/content/modules/jsunit-wrapper.js:37:17
execTest at file:///home/dkg/src/enigmail/enigmail/package/tests/main.js:20:5
executeScript at chrome://jsunit/content/modules/jsunit-main.jsm:212:27
startCmdLineTests at chrome://jsunit/content/modules/jsunit-service.js:42:14
_f at chrome://jsunit/content/modules/jsunit-service.js:58:7
notify at resource://gre/modules/Timer.jsm:62:17

A is the most troubling -- it seems possible that A indicates a failure
to import an OpenPGP certificate from an autocrypt header.

B looks like it might just be an issue with a differently-formatted
secret key -- the test is very strict about exactly what the right key
is, but this isn't something that should be too bad -- as long as the
constructed minimal OpenPGP certificate is plausible, we might even just
fix this by updating the test to match whatever GnuPG does.

C looks like a possible problem with symmetric encryption and decryption
using GnuPG.  This is probably best tested with some minimal test like

"use strict";
let enc = {
    message: "this is a silly test, right?\ni know!\n",
    password: "abc1234",
    format: "utf8"
dump("message: " + enc.message + "\n");
dump("password: " + enc.password + "\n");

const EnigmailGpg = ChromeUtils.import("chrome://enigmail/content/modules/gpg.jsm").EnigmailGpg;
msg = EnigmailGpg.symmetricDecrypt(enc);
dump("output: " + msg + "\n");

However this fails on the ChromeUtils.import line, with:

Exception occurred:
[Exception... "File error: Not found"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: file:///home/dkg/main.js :: <TOP_LEVEL> :: line 10"  data: no] - 
** Tests aborted **

I'd love any advice or guidance people care to share here :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-mozext-maintainers/attachments/20191106/b848250b/attachment-0001.sig>

More information about the Pkg-mozext-maintainers mailing list