Merged in ENGINE-427 ENGINE-451
authorKrista Bennett <krista@pep-project.org>
Tue, 14 Aug 2018 09:05:36 +0200
branchENGINE-451
changeset 2822a33bdd73952a
parent 2820 46428521d2a8
parent 2821 7fe5b66e570d
child 2824 34863e77a260
Merged in ENGINE-427
src/pgp_gpg.c
test/include/EngineTestSuite.h
test/src/EngineTestSuite.cc
test/src/SuiteMaker.cc
test/src/engine_tests/GPGConfFixTests.cc
     1.1 --- a/test/src/EngineTestSuite.cc	Tue Aug 14 08:08:11 2018 +0200
     1.2 +++ b/test/src/EngineTestSuite.cc	Tue Aug 14 09:05:36 2018 +0200
     1.3 @@ -5,6 +5,10 @@
     1.4  #include <unistd.h>
     1.5  #include <ftw.h>
     1.6  #include <assert.h>
     1.7 +#include <fstream>
     1.8 +#include <iostream>
     1.9 +#include <sys/types.h>
    1.10 +#include <sys/stat.h>
    1.11  
    1.12  #include "platform_unix.h"
    1.13  
    1.14 @@ -30,7 +34,37 @@
    1.15      number_of_tests++;
    1.16  }
    1.17  
    1.18 +void EngineTestSuite::copy_conf_file_to_test_dir(const char* dest_path, const char* conf_orig_path, const char* conf_dest_name) {
    1.19 +    string conf_dest_path = dest_path;
    1.20 +    
    1.21 +    struct stat pathinfo;
    1.22 +
    1.23 +    if(stat(conf_dest_path.c_str(), &pathinfo) != 0) {
    1.24 +        int errchk = mkdir(conf_dest_path.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
    1.25 +        if (errchk != 0)
    1.26 +            throw std::runtime_error("Error accessing conf file directory.");
    1.27 +    }
    1.28 +    
    1.29 +    conf_dest_path += "/";
    1.30 +    conf_dest_path += conf_dest_name;
    1.31 +    
    1.32 +    ifstream src(conf_orig_path);
    1.33 +    ofstream dst(conf_dest_path.c_str(), ios::trunc);
    1.34 +    
    1.35 +    assert(src);
    1.36 +    assert(dst);
    1.37 +    
    1.38 +    dst << src.rdbuf();
    1.39 +     
    1.40 +    src.close();
    1.41 +    dst.close();
    1.42 +}
    1.43 +
    1.44  void EngineTestSuite::set_full_env() {
    1.45 +    set_full_env(NULL, NULL, NULL);
    1.46 +}
    1.47 +
    1.48 +void EngineTestSuite::set_full_env(const char* gpg_conf_copy_path, const char* gpg_agent_conf_file_copy_path, const char* db_conf_file_copy_path) {
    1.49      int success = 0;
    1.50      struct stat dirchk;
    1.51      
    1.52 @@ -39,7 +73,7 @@
    1.53      success = system("gpgconf --kill all");
    1.54      if (success != 0)
    1.55          throw std::runtime_error("SETUP: Error when executing 'gpgconf --kill all'.");
    1.56 -    sleep(1); // hopefully enough time for the system to recognise that it is dead. *sigh*    
    1.57 + //   sleep(1); // hopefully enough time for the system to recognise that it is dead. *sigh*    
    1.58  
    1.59      if (stat(test_home.c_str(), &dirchk) == 0) {
    1.60          if (!S_ISDIR(dirchk.st_mode))
    1.61 @@ -59,7 +93,7 @@
    1.62              throw std::runtime_error("Error creating a test directory.");
    1.63      }
    1.64  
    1.65 -    string temp_test_home = test_home + "/" + my_name;
    1.66 +    temp_test_home = test_home + "/" + my_name;
    1.67      
    1.68      int errchk = mkdir(temp_test_home.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
    1.69      if (errchk != 0)
    1.70 @@ -85,16 +119,22 @@
    1.71      cout << "home is " << home << endl;
    1.72      assert(temp_test_home.compare(home) != 0);
    1.73      assert(temp_test_home.compare(home + "/") != 0);
    1.74 +    assert(temp_test_home.compare(home + "/.gnupg") != 0); // This is an EXCLUSION test, so we leave this.
    1.75 +    assert(temp_test_home.compare(home + ".gnupg") != 0);
    1.76      assert(temp_test_home.compare(home + "/gnupg") != 0);
    1.77      assert(temp_test_home.compare(home + "gnupg") != 0);
    1.78      assert(temp_test_home.compare(prev_gpg_home) != 0);
    1.79      assert(temp_test_home.compare(prev_gpg_home + "/gnupg") != 0);
    1.80      assert(temp_test_home.compare(prev_gpg_home + "gnupg") != 0);
    1.81 +    assert(temp_test_home.compare(prev_gpg_home + "/.gnupg") != 0);
    1.82 +    assert(temp_test_home.compare(prev_gpg_home + ".gnupg") != 0);
    1.83  
    1.84      if (temp_test_home.compare(home) == 0 || temp_test_home.compare(home + "/") == 0 ||
    1.85          temp_test_home.compare(home + "/gnupg") == 0 || temp_test_home.compare(home + "gnupg") == 0 ||
    1.86 +        temp_test_home.compare(home + "/.gnupg") == 0 || temp_test_home.compare(home + ".gnupg") == 0 ||
    1.87          temp_test_home.compare(prev_gpg_home) == 0 || temp_test_home.compare(prev_gpg_home + "/gnupg") == 0 ||
    1.88 -        temp_test_home.compare(prev_gpg_home + "gnupg") == 0)
    1.89 +        temp_test_home.compare(prev_gpg_home + "gnupg") == 0 || temp_test_home.compare(prev_gpg_home + "/.gnupg") == 0 ||
    1.90 +        temp_test_home.compare(prev_gpg_home + ".gnupg") == 0)
    1.91          throw std::runtime_error("SETUP: new GNUPGHOME threatens to mess up user GNUPGHOME (and delete all their keys). NO DICE.");
    1.92      
    1.93  //    cout << "Ok - checked if new test home will be safe. We'll try and make the directory, deleting it if it has already exists." << endl;
    1.94 @@ -110,7 +150,14 @@
    1.95      success = setenv("HOME", temp_test_home.c_str(), 1);
    1.96      if (success != 0)
    1.97          throw std::runtime_error("SETUP: Cannot set test_home for init.");
    1.98 -    
    1.99 +
   1.100 +    if (gpg_conf_copy_path)
   1.101 +        copy_conf_file_to_test_dir((temp_test_home + "/gnupg").c_str(), gpg_conf_copy_path, "gpg.conf");
   1.102 +    if (gpg_agent_conf_file_copy_path)        
   1.103 +        copy_conf_file_to_test_dir((temp_test_home + "/gnupg").c_str(), gpg_agent_conf_file_copy_path, "gpg-agent.conf");
   1.104 +    if (db_conf_file_copy_path)
   1.105 +        copy_conf_file_to_test_dir(temp_test_home.c_str(), db_conf_file_copy_path, ".pEp_management.db");
   1.106 +        
   1.107      unix_local_db(true);
   1.108      gpg_conf(true);
   1.109      gpg_agent_conf(true);
     2.1 --- a/test/src/SuiteMaker.cc	Tue Aug 14 08:08:11 2018 +0200
     2.2 +++ b/test/src/SuiteMaker.cc	Tue Aug 14 09:05:36 2018 +0200
     2.3 @@ -12,159 +12,163 @@
     2.4  #include "SuiteMaker.h"
     2.5  
     2.6  // Begin where we generate stuff
     2.7 +#include "MapAsn1Tests.h"
     2.8 +#include "DecorateTests.h"
     2.9 +#include "EncryptMissingPrivateKeyTests.h"
    2.10 +#include "KeyeditTests.h"
    2.11 +#include "BlacklistAcceptNewKeyTests.h"
    2.12 +#include "DecryptAttachPrivateKeyUntrustedTests.h"
    2.13 +#include "AppleMailTests.h"
    2.14 +#include "CaseAndDotAddressTests.h"
    2.15 +#include "SequenceTests.h"
    2.16 +#include "BCCTests.h"
    2.17 +#include "MessageApiTests.h"
    2.18 +#include "I18nTests.h"
    2.19 +#include "CrashdumpTests.h"
    2.20 +#include "PgpBinaryTests.h"
    2.21 +#include "RevokeRegenAttachTests.h"
    2.22 +#include "BlacklistTests.h"
    2.23 +#include "LeastCommonDenomColorTests.h"
    2.24 +#include "PepSubjectReceivedTests.h"
    2.25 +#include "MistrustUndoTests.h"
    2.26 +#include "StringpairListTests.h"
    2.27 +#include "PgpListKeysTests.h"
    2.28 +#include "ReencryptPlusExtraKeysTests.h"
    2.29  #include "MimeTests.h"
    2.30  #include "BloblistTests.h"
    2.31  #include "NewUpdateIdAndMyselfTests.h"
    2.32 -#include "I18nTests.h"
    2.33 +#include "StringlistTests.h"
    2.34 +#include "LeastColorGroupTests.h"
    2.35 +#include "GPGConfFixTests.h"
    2.36 +#include "ExternalRevokeTests.h"
    2.37 +#include "EncryptForIdentityTests.h"
    2.38 +#include "TrustwordsTests.h"
    2.39 +#include "TrustManipulationTests.h"
    2.40 +#include "MessageTwoPointOhTests.h"
    2.41 +#include "EncryptAttachPrivateKeyTests.h"
    2.42 +#include "DecryptAttachPrivateKeyTrustedTests.h"
    2.43  #include "IdentityListTests.h"
    2.44 -#include "PgpBinaryTests.h"
    2.45 -#include "MistrustUndoTests.h"
    2.46 -#include "LeastCommonDenomColorTests.h"
    2.47 -#include "StringlistTests.h"
    2.48 -#include "PgpListKeysTests.h"
    2.49 -#include "MessageApiTests.h"
    2.50 -#include "EncryptMissingPrivateKeyTests.h"
    2.51 -#include "CaseAndDotAddressTests.h"
    2.52  #include "UserIDAliasTests.h"
    2.53 -#include "BCCTests.h"
    2.54 -#include "BlacklistAcceptNewKeyTests.h"
    2.55 -#include "DecryptAttachPrivateKeyUntrustedTests.h"
    2.56 -#include "BlacklistTests.h"
    2.57 -#include "RevokeRegenAttachTests.h"
    2.58 -#include "PepSubjectReceivedTests.h"
    2.59 -#include "SequenceTests.h"
    2.60 -#include "EncryptAttachPrivateKeyTests.h"
    2.61 -#include "ExternalRevokeTests.h"
    2.62 -#include "KeyeditTests.h"
    2.63 -#include "LeastColorGroupTests.h"
    2.64 -#include "DecryptAttachPrivateKeyTrustedTests.h"
    2.65 -#include "TrustwordsTests.h"
    2.66 -#include "ReencryptPlusExtraKeysTests.h"
    2.67 -#include "MapAsn1Tests.h"
    2.68 -#include "DecorateTests.h"
    2.69 -#include "MessageTwoPointOhTests.h"
    2.70 -#include "CrashdumpTests.h"
    2.71 -#include "StringpairListTests.h"
    2.72 -#include "EncryptForIdentityTests.h"
    2.73 -#include "TrustManipulationTests.h"
    2.74 -#include "AppleMailTests.h"
    2.75  
    2.76  
    2.77  const char* SuiteMaker::all_suites[] = {
    2.78 +    "MapAsn1Tests",
    2.79 +    "DecorateTests",
    2.80 +    "EncryptMissingPrivateKeyTests",
    2.81 +    "KeyeditTests",
    2.82 +    "BlacklistAcceptNewKeyTests",
    2.83 +    "DecryptAttachPrivateKeyUntrustedTests",
    2.84 +    "AppleMailTests",
    2.85 +    "CaseAndDotAddressTests",
    2.86 +    "SequenceTests",
    2.87 +    "BCCTests",
    2.88 +    "MessageApiTests",
    2.89 +    "I18nTests",
    2.90 +    "CrashdumpTests",
    2.91 +    "PgpBinaryTests",
    2.92 +    "RevokeRegenAttachTests",
    2.93 +    "BlacklistTests",
    2.94 +    "LeastCommonDenomColorTests",
    2.95 +    "PepSubjectReceivedTests",
    2.96 +    "MistrustUndoTests",
    2.97 +    "StringpairListTests",
    2.98 +    "PgpListKeysTests",
    2.99 +    "ReencryptPlusExtraKeysTests",
   2.100      "MimeTests",
   2.101      "BloblistTests",
   2.102      "NewUpdateIdAndMyselfTests",
   2.103 -    "I18nTests",
   2.104 +    "StringlistTests",
   2.105 +    "LeastColorGroupTests",
   2.106 +    "GPGConfFixTests",
   2.107 +    "ExternalRevokeTests",
   2.108 +    "EncryptForIdentityTests",
   2.109 +    "TrustwordsTests",
   2.110 +    "TrustManipulationTests",
   2.111 +    "MessageTwoPointOhTests",
   2.112 +    "EncryptAttachPrivateKeyTests",
   2.113 +    "DecryptAttachPrivateKeyTrustedTests",
   2.114      "IdentityListTests",
   2.115 -    "PgpBinaryTests",
   2.116 -    "MistrustUndoTests",
   2.117 -    "LeastCommonDenomColorTests",
   2.118 -    "StringlistTests",
   2.119 -    "PgpListKeysTests",
   2.120 -    "MessageApiTests",
   2.121 -    "EncryptMissingPrivateKeyTests",
   2.122 -    "CaseAndDotAddressTests",
   2.123      "UserIDAliasTests",
   2.124 -    "BCCTests",
   2.125 -    "BlacklistAcceptNewKeyTests",
   2.126 -    "DecryptAttachPrivateKeyUntrustedTests",
   2.127 -    "BlacklistTests",
   2.128 -    "RevokeRegenAttachTests",
   2.129 -    "PepSubjectReceivedTests",
   2.130 -    "SequenceTests",
   2.131 -    "EncryptAttachPrivateKeyTests",
   2.132 -    "ExternalRevokeTests",
   2.133 -    "KeyeditTests",
   2.134 -    "LeastColorGroupTests",
   2.135 -    "DecryptAttachPrivateKeyTrustedTests",
   2.136 -    "TrustwordsTests",
   2.137 -    "ReencryptPlusExtraKeysTests",
   2.138 -    "MapAsn1Tests",
   2.139 -    "DecorateTests",
   2.140 -    "MessageTwoPointOhTests",
   2.141 -    "CrashdumpTests",
   2.142 -    "StringpairListTests",
   2.143 -    "EncryptForIdentityTests",
   2.144 -    "TrustManipulationTests",
   2.145 -    "AppleMailTests",
   2.146  };
   2.147  
   2.148  // This file is generated, so magic constants are ok.
   2.149 -int SuiteMaker::num_suites = 36;
   2.150 +int SuiteMaker::num_suites = 37;
   2.151  
   2.152  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
   2.153 -    if (strcmp(test_class_name, "MimeTests") == 0)
   2.154 +    if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   2.155 +        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   2.156 +    else if (strcmp(test_class_name, "DecorateTests") == 0)
   2.157 +        *test_suite = new DecorateTests(test_class_name, test_home);
   2.158 +    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   2.159 +        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   2.160 +    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   2.161 +        *test_suite = new KeyeditTests(test_class_name, test_home);
   2.162 +    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   2.163 +        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   2.164 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   2.165 +        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   2.166 +    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   2.167 +        *test_suite = new AppleMailTests(test_class_name, test_home);
   2.168 +    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   2.169 +        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   2.170 +    else if (strcmp(test_class_name, "SequenceTests") == 0)
   2.171 +        *test_suite = new SequenceTests(test_class_name, test_home);
   2.172 +    else if (strcmp(test_class_name, "BCCTests") == 0)
   2.173 +        *test_suite = new BCCTests(test_class_name, test_home);
   2.174 +    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   2.175 +        *test_suite = new MessageApiTests(test_class_name, test_home);
   2.176 +    else if (strcmp(test_class_name, "I18nTests") == 0)
   2.177 +        *test_suite = new I18nTests(test_class_name, test_home);
   2.178 +    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   2.179 +        *test_suite = new CrashdumpTests(test_class_name, test_home);
   2.180 +    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   2.181 +        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   2.182 +    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   2.183 +        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   2.184 +    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   2.185 +        *test_suite = new BlacklistTests(test_class_name, test_home);
   2.186 +    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   2.187 +        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   2.188 +    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   2.189 +        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   2.190 +    else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
   2.191 +        *test_suite = new MistrustUndoTests(test_class_name, test_home);
   2.192 +    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   2.193 +        *test_suite = new StringpairListTests(test_class_name, test_home);
   2.194 +    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   2.195 +        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   2.196 +    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   2.197 +        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   2.198 +    else if (strcmp(test_class_name, "MimeTests") == 0)
   2.199          *test_suite = new MimeTests(test_class_name, test_home);
   2.200      else if (strcmp(test_class_name, "BloblistTests") == 0)
   2.201          *test_suite = new BloblistTests(test_class_name, test_home);
   2.202      else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   2.203          *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   2.204 -    else if (strcmp(test_class_name, "I18nTests") == 0)
   2.205 -        *test_suite = new I18nTests(test_class_name, test_home);
   2.206 +    else if (strcmp(test_class_name, "StringlistTests") == 0)
   2.207 +        *test_suite = new StringlistTests(test_class_name, test_home);
   2.208 +    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   2.209 +        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   2.210 +    else if (strcmp(test_class_name, "GPGConfFixTests") == 0)
   2.211 +        *test_suite = new GPGConfFixTests(test_class_name, test_home);
   2.212 +    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   2.213 +        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   2.214 +    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   2.215 +        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   2.216 +    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   2.217 +        *test_suite = new TrustwordsTests(test_class_name, test_home);
   2.218 +    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   2.219 +        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   2.220 +    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   2.221 +        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   2.222 +    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   2.223 +        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   2.224 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   2.225 +        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   2.226      else if (strcmp(test_class_name, "IdentityListTests") == 0)
   2.227          *test_suite = new IdentityListTests(test_class_name, test_home);
   2.228 -    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   2.229 -        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   2.230 -    else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
   2.231 -        *test_suite = new MistrustUndoTests(test_class_name, test_home);
   2.232 -    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   2.233 -        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   2.234 -    else if (strcmp(test_class_name, "StringlistTests") == 0)
   2.235 -        *test_suite = new StringlistTests(test_class_name, test_home);
   2.236 -    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   2.237 -        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   2.238 -    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   2.239 -        *test_suite = new MessageApiTests(test_class_name, test_home);
   2.240 -    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   2.241 -        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   2.242 -    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   2.243 -        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   2.244      else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   2.245          *test_suite = new UserIDAliasTests(test_class_name, test_home);
   2.246 -    else if (strcmp(test_class_name, "BCCTests") == 0)
   2.247 -        *test_suite = new BCCTests(test_class_name, test_home);
   2.248 -    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   2.249 -        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   2.250 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   2.251 -        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   2.252 -    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   2.253 -        *test_suite = new BlacklistTests(test_class_name, test_home);
   2.254 -    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   2.255 -        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   2.256 -    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   2.257 -        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   2.258 -    else if (strcmp(test_class_name, "SequenceTests") == 0)
   2.259 -        *test_suite = new SequenceTests(test_class_name, test_home);
   2.260 -    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   2.261 -        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   2.262 -    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   2.263 -        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   2.264 -    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   2.265 -        *test_suite = new KeyeditTests(test_class_name, test_home);
   2.266 -    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   2.267 -        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   2.268 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   2.269 -        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   2.270 -    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   2.271 -        *test_suite = new TrustwordsTests(test_class_name, test_home);
   2.272 -    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   2.273 -        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   2.274 -    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   2.275 -        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   2.276 -    else if (strcmp(test_class_name, "DecorateTests") == 0)
   2.277 -        *test_suite = new DecorateTests(test_class_name, test_home);
   2.278 -    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   2.279 -        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   2.280 -    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   2.281 -        *test_suite = new CrashdumpTests(test_class_name, test_home);
   2.282 -    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   2.283 -        *test_suite = new StringpairListTests(test_class_name, test_home);
   2.284 -    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   2.285 -        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   2.286 -    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   2.287 -        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   2.288 -    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   2.289 -        *test_suite = new AppleMailTests(test_class_name, test_home);
   2.290  }
   2.291  
   2.292  void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {
     3.1 --- a/test/src/engine_tests/GPGConfFixTests.cc	Tue Aug 14 08:08:11 2018 +0200
     3.2 +++ b/test/src/engine_tests/GPGConfFixTests.cc	Tue Aug 14 09:05:36 2018 +0200
     3.3 @@ -98,74 +98,74 @@
     3.4  
     3.5  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_0() {
     3.6      set_full_env("test_files/427_bad_gpg_conf_0", NULL, "test_files/427_old_db");
     3.7 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_0", (temp_test_home + "/.gnupg/gpg.conf").c_str()));
     3.8 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_0", (temp_test_home + "/gnupg/gpg.conf").c_str()));
     3.9  }
    3.10  
    3.11  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_1() {
    3.12      set_full_env("test_files/427_bad_gpg_conf_1", NULL, "test_files/427_old_db");    
    3.13 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_1", (temp_test_home + "/.gnupg/gpg.conf").c_str()));
    3.14 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_1", (temp_test_home + "/gnupg/gpg.conf").c_str()));
    3.15      
    3.16  }
    3.17  
    3.18  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_2() {
    3.19      set_full_env("test_files/427_bad_gpg_conf_2", NULL, "test_files/427_old_db");        
    3.20 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_2", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    3.21 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_2", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    3.22  }
    3.23  
    3.24  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_3() {
    3.25      set_full_env("test_files/427_bad_gpg_conf_3", NULL, "test_files/427_old_db");    
    3.26 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_3", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    3.27 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_3", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    3.28  }
    3.29  
    3.30  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_4() {
    3.31      set_full_env("test_files/427_bad_gpg_conf_4", NULL, "test_files/427_old_db");        
    3.32 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_4", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    3.33 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_4", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    3.34  }
    3.35  
    3.36  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_5() {
    3.37      set_full_env("test_files/427_bad_gpg_conf_5", NULL, "test_files/427_old_db");        
    3.38 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_5", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    3.39 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_5", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    3.40  }
    3.41  
    3.42  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_6() {
    3.43      set_full_env("test_files/427_bad_gpg_conf_6", NULL, "test_files/427_old_db");        
    3.44 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_6", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    3.45 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_6", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    3.46  }
    3.47  
    3.48  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_0() {
    3.49      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_0", "test_files/427_old_db");
    3.50 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_0", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));
    3.51 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_0", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));
    3.52  }
    3.53  
    3.54  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_1() {
    3.55      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_1", "test_files/427_old_db");    
    3.56 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_1", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));
    3.57 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_1", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));
    3.58      
    3.59  }
    3.60  
    3.61  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_2() {
    3.62      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_2", "test_files/427_old_db");        
    3.63 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_2", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    3.64 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_2", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    3.65  }
    3.66  
    3.67  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_3() {
    3.68      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_3", "test_files/427_old_db");    
    3.69 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_3", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    3.70 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_3", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    3.71  }
    3.72  
    3.73  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_4() {
    3.74      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_4", "test_files/427_old_db");        
    3.75 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_4", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    3.76 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_4", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    3.77  }
    3.78  
    3.79  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_5() {
    3.80      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_5", "test_files/427_old_db");        
    3.81 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_5", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    3.82 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_5", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    3.83  }
    3.84  
    3.85  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_6() {
    3.86      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_6", "test_files/427_old_db");        
    3.87 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_6", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    3.88 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_6", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    3.89  }
    3.90  
    3.91  void GPGConfFixTests::check_gpgconf_overwrite_0() {