]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
unit tests for PGLog::merge_old_entry 340/head
authorLoic Dachary <loic@dachary.org>
Sun, 2 Jun 2013 10:53:48 +0000 (12:53 +0200)
committerLoic Dachary <loic@dachary.org>
Tue, 4 Jun 2013 11:43:20 +0000 (13:43 +0200)
commitb70868e007ffa56e0eabf22b4ca836327c5f82d4
tree359146174764b23b317ec89d383caed5438e0808
parent6cdc4f8fda11dd397f4b05acdcf66e7522e5a681
unit tests for PGLog::merge_old_entry

The tests covers 100% of the LOC of merge_old_entry. It is broken down
in 13 cases to enumerate all the situations it must address. Each case
is isolated in a independant code block where the conditions are
reproduced. For  instance:

    info.last_backfill = hobject_t();
    info.last_backfill.hash = 1;
    oe.soid.hash = 2;

creates the conditions where merge_log_entry is expected to silently
ignore entries containing an object that is greater than
last_backfill.

PGLogTest is derived from PGLog to get access to the protected members.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/Makefile.am
src/test/osd/TestPGLog.cc [new file with mode: 0644]