]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_rados: do not COPY_FROM self
authorSage Weil <sage@inktank.com>
Sat, 21 Sep 2013 03:43:12 +0000 (20:43 -0700)
committerSage Weil <sage@inktank.com>
Sat, 21 Sep 2013 03:43:12 +0000 (20:43 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/test/osd/TestRados.cc

index 1b6bd073a1264b7ac7ecf7e88b1428a81989a563..970d45752448f7835dc82705750a2b528742e52d 100644 (file)
@@ -155,7 +155,9 @@ private:
 
     case TEST_OP_COPY_FROM:
       oid = *(rand_choose(context.oid_not_in_use));
-      oid2 = *(rand_choose(context.oid_not_in_use));
+      do {
+       oid2 = *(rand_choose(context.oid_not_in_use));
+      } while (oid == oid2);
       cout << "copy_from oid " << oid << " from oid " << oid2
           << " current snap is " << context.current_snap << std::endl;
       return new CopyFromOp(m_op, &context, oid, oid2, m_stats);