X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftest%2Ftest_trans.cc;fp=src%2Fceph%2Fsrc%2Ftest%2Ftest_trans.cc;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=394b9892aaa8572211aa157982710048c87ed7bd;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/test/test_trans.cc b/src/ceph/src/test/test_trans.cc deleted file mode 100644 index 394b989..0000000 --- a/src/ceph/src/test/test_trans.cc +++ /dev/null @@ -1,80 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab -/* - * Ceph - scalable distributed file system - * - * Copyright (C) 2004-2006 Sage Weil - * - * This is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software - * Foundation. See file COPYING. - * - */ - -#include -#include "common/ceph_argparse.h" -#include "common/debug.h" -#include "os/filestore/FileStore.h" -#include "global/global_init.h" -#include "include/assert.h" - -#define dout_context g_ceph_context -#define dout_subsys ceph_subsys_filestore -#undef dout_prefix -#define dout_prefix *_dout - -struct Foo : public Thread { - void *entry() override { - dout(0) << "foo started" << dendl; - sleep(1); - dout(0) << "foo asserting 0" << dendl; - ceph_abort(); - } -} foo; - -int main(int argc, const char **argv) -{ - vector args; - argv_to_vec(argc, argv, args); - env_to_vec(args); - - auto cct = global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, - CODE_ENVIRONMENT_UTILITY, 0); - common_init_finish(g_ceph_context); - - // args - if (args.size() < 2) return -1; - const char *filename = args[0]; - int mb = atoi(args[1]); - - cout << "#dev " << filename << std::endl; - cout << "#mb " << mb << std::endl; - - ObjectStore *fs = new FileStore(cct.get(), filename, NULL); - if (fs->mount() < 0) { - cout << "mount failed" << std::endl; - return -1; - } - - ObjectStore::Sequencer osr(__func__); - ObjectStore::Transaction t; - char buf[1 << 20]; - bufferlist bl; - bl.append(buf, sizeof(buf)); - t.create_collection(coll_t(), 0); - - for (int i=0; iapply_transaction(&osr, std::move(t)); - -} -