diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/backupstore/testbackupstore.cpp | 19 | ||||
-rw-r--r-- | test/backupstorefix/testbackupstorefix.cpp | 10 |
2 files changed, 19 insertions, 10 deletions
diff --git a/test/backupstore/testbackupstore.cpp b/test/backupstore/testbackupstore.cpp index 756fb03c..840d004c 100644 --- a/test/backupstore/testbackupstore.cpp +++ b/test/backupstore/testbackupstore.cpp @@ -1926,14 +1926,19 @@ int test(int argc, const char *argv[]) // for seeing what's going on. BackupClientCryptoKeys_Setup("testfiles/bbackupd.keys"); - // encode in some filenames -- can't do static initialisation because the key won't be set up when these are initialised - for(unsigned int l = 0; l < sizeof(ens_filenames) / sizeof(ens_filenames[0]); ++l) + // encode in some filenames -- can't do static initialisation + // because the key won't be set up when these are initialised { - ens[l].fn = BackupStoreFilenameClear(ens_filenames[l]); - } - for(unsigned int l = 0; l < sizeof(uploads_filenames) / sizeof(uploads_filenames[0]); ++l) - { - uploads[l].name = BackupStoreFilenameClear(uploads_filenames[l]); + MEMLEAKFINDER_NO_LEAKS + + for(unsigned int l = 0; l < sizeof(ens_filenames) / sizeof(ens_filenames[0]); ++l) + { + ens[l].fn = BackupStoreFilenameClear(ens_filenames[l]); + } + for(unsigned int l = 0; l < sizeof(uploads_filenames) / sizeof(uploads_filenames[0]); ++l) + { + uploads[l].name = BackupStoreFilenameClear(uploads_filenames[l]); + } } // Trace errors out diff --git a/test/backupstorefix/testbackupstorefix.cpp b/test/backupstorefix/testbackupstorefix.cpp index 92928cc6..0349b039 100644 --- a/test/backupstorefix/testbackupstorefix.cpp +++ b/test/backupstorefix/testbackupstorefix.cpp @@ -202,9 +202,12 @@ void check_dir_dep(BackupStoreDirectory &dir, checkdepinfoen *ck) void test_dir_fixing() { - fnames[0].SetAsClearFilename("x1"); - fnames[1].SetAsClearFilename("x2"); - fnames[2].SetAsClearFilename("x3"); + { + MEMLEAKFINDER_NO_LEAKS; + fnames[0].SetAsClearFilename("x1"); + fnames[1].SetAsClearFilename("x2"); + fnames[2].SetAsClearFilename("x3"); + } { BackupStoreDirectory dir; @@ -344,6 +347,7 @@ int test(int argc, const char *argv[]) TEST_THAT(::sscanf(line, "%x %s %s", &id, flags, name) == 3); bool isDir = (::strcmp(flags, "-d---") == 0); //TRACE3("%x,%d,%s\n", id, isDir, name); + MEMLEAKFINDER_NO_LEAKS; nameToID[std::string(name)] = id; objectIsDir[id] = isDir; } |