Changeset 2122
- Timestamp:
- 04/04/2008 21:06:47 (4 years ago)
- Location:
- box/trunk/test
- Files:
-
- 3 edited
-
backupdiff/testbackupdiff.cpp (modified) (3 diffs)
-
compress/testcompress.cpp (modified) (1 diff)
-
raidfile/testraidfile.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/test/backupdiff/testbackupdiff.cpp
r1076 r2122 111 111 // number of blocks 112 112 int64_t nblocks = box_ntoh64(hdr.mNumBlocks); 113 TRACE2("Reading index from '%s', has %lld blocks\n", filename, nblocks); 114 TRACE0("======== ===== ========== ======== ========\n Index Where EncSz/Idx Size WChcksm\n"); 113 BOX_TRACE("Reading index from '" << filename << "', has " << 114 nblocks << " blocks"); 115 BOX_TRACE("======== ===== ========== ======== ========"); 116 BOX_TRACE(" Index Where EncSz/Idx Size WChcksm"); 115 117 // Read them all in 116 118 int64_t nnew = 0, nold = 0; … … 120 122 TEST_THAT(enc.ReadFullBuffer(&en, sizeof(en), 0)); 121 123 int64_t s = box_ntoh64(en.mEncodedSize); 122 if(s > 0) 123 { 124 nnew++; 125 #ifdef WIN32 126 TRACE2("%8I64d this s=%8I64d", b, s); 127 #else 128 TRACE2("%8lld this s=%8lld", b, s); 129 #endif 130 } 131 else 132 { 133 nold++; 134 #ifdef WIN32 135 TRACE2("%8I64d other i=%8I64d", b, 0 - s); 136 #else 137 TRACE2("%8lld other i=%8lld", b, 0 - s); 138 #endif 139 } 124 140 125 // Decode the rest 141 126 uint64_t iv = box_ntoh64(hdr.mEntryIVBase); … … 143 128 sBlowfishDecryptBlockEntry.SetIV(&iv); 144 129 file_BlockIndexEntryEnc entryEnc; 145 sBlowfishDecryptBlockEntry.TransformBlock(&entryEnc, sizeof(entryEnc), 146 en.mEnEnc, sizeof(en.mEnEnc)); 147 TRACE2(" %8d %08x\n", ntohl(entryEnc.mSize), ntohl(entryEnc.mWeakChecksum)); 148 149 } 150 TRACE0("======== ===== ========== ======== ========\n"); 130 sBlowfishDecryptBlockEntry.TransformBlock(&entryEnc, 131 sizeof(entryEnc), en.mEnEnc, sizeof(en.mEnEnc)); 132 133 134 if(s > 0) 135 { 136 nnew++; 137 BOX_TRACE(std::setw(8) << b << " this s=" << 138 std::setw(8) << s << " " << 139 std::setw(8) << ntohl(entryEnc.mSize) << " " << 140 std::setw(8) << std::setfill('0') << 141 std::hex << ntohl(entryEnc.mWeakChecksum)); 142 } 143 else 144 { 145 nold++; 146 BOX_TRACE(std::setw(8) << b << " other i=" << 147 std::setw(8) << (0-s) << 148 std::setw(8) << ntohl(entryEnc.mSize) << " " << 149 std::setw(8) << std::setfill('0') << 150 std::hex << ntohl(entryEnc.mWeakChecksum)); 151 } 152 } 153 BOX_TRACE("======== ===== ========== ======== ========"); 151 154 TEST_THAT(new_blocks_expected == nnew); 152 155 TEST_THAT(old_blocks_expected == nold); -
box/trunk/test/compress/testcompress.cpp
r217 r2122 91 91 // Check sizes 92 92 TEST_THAT(poutput->GetSize() < source.GetSize()); 93 TRACE2("compressed size = %d, source size = %d\n", poutput->GetSize(), source.GetSize()); 93 BOX_TRACE("compressed size = " << poutput->GetSize() << 94 ", source size = " << source.GetSize()); 94 95 95 96 // Decompress the data -
box/trunk/test/raidfile/testraidfile.cpp
r710 r2122 623 623 TEST_THAT(n1 != n3); 624 624 TEST_THAT(n1 == n4); // ie wraps around 625 TRACE3("Gen paths= '%s','%s',%s'\n", n1.c_str(), n2.c_str(), n3.c_str()); 625 BOX_TRACE("Gen paths = '" << n1 << "', '" << n2 << 626 "', '" << n3); 626 627 } 627 628
Note: See TracChangeset
for help on using the changeset viewer.
