| 379 | } |
| 380 | |
| 381 | bool |
| 382 | DecodeAndVerify(ErasureCodeIsaDefault& Isa, shard_id_map<bufferlist> °raded, shard_id_set want_to_decode, buffer::ptr* enc, int length) |
| 383 | { |
| 384 | shard_id_map<bufferlist> decoded(Isa.get_chunk_count()); |
| 385 | bool ok; |
| 386 | |
| 387 | // decode as requested |
| 388 | ok = Isa._decode(want_to_decode, |
| 389 | degraded, |
| 390 | &decoded); |
| 391 | |
| 392 | for (int i = 0; i < (int) decoded.size(); i++) { |
| 393 | // compare all the buffers with their original |
| 394 | ok |= memcmp(decoded[shard_id_t(i)].c_str(), enc[i].c_str(), length); |
| 395 | } |
| 396 | |
| 397 | return ok; |
| 398 | } |
| 399 | |
| 400 | TEST_F(IsaErasureCodeTest, isa_vandermonde_exhaustive) |
| 401 | { |
no test coverage detected