repo stringlengths 1 152 ⌀ | file stringlengths 15 205 | code stringlengths 0 41.6M | file_length int64 0 41.6M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 90
values |
|---|---|---|---|---|---|---|
null | ceph-main/src/test/test_rgw_admin_log.cc | // -*- 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) 2013 eNovance SAS <licensing@enovance.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser Gener... | 53,791 | 32.810182 | 111 | cc |
null | ceph-main/src/test/test_rgw_admin_meta.cc | // -*- 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) 2013 eNovance SAS <licensing@enovance.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser Gener... | 28,954 | 30.302703 | 104 | cc |
null | ceph-main/src/test/test_rgw_ldap.cc | // -*- 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) 2015 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 2,885 | 23.666667 | 212 | cc |
null | ceph-main/src/test/test_rgw_token.cc | // -*- 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) 2016 Red Hat, Inc.
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License vers... | 3,222 | 24.784 | 203 | cc |
null | ceph-main/src/test/test_rw.sh | #!/usr/bin/env bash
set -x
#
# Generic read/write from object store test
#
# Includes
source "`dirname $0`/test_common.sh"
TEST_POOL=rbd
# Functions
my_write_objects() {
write_objects $1 $2 10 1000000 $TEST_POOL
}
setup() {
export CEPH_NUM_OSD=$1
# Start ceph
./stop.sh
./v... | 854 | 14.833333 | 51 | sh |
null | ceph-main/src/test/test_snap_mapper.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
#include <iterator>
#include <map>
#include <set>
#include <boost/scoped_ptr.hpp>
#include <sys/types.h>
#include <cstdlib>
#include "include/buffer.h"
#include "common/map_cacher.hpp"
#include "osd/osd_types_fmt.h"
#include "osd/SnapMapper.h"
#inc... | 25,223 | 25.467996 | 116 | cc |
null | ceph-main/src/test/test_split.sh | #!/usr/bin/env bash
set -x
#
# Add some objects to the data PGs, and then test splitting those PGs
#
# Includes
source "`dirname $0`/test_common.sh"
TEST_POOL=rbd
# Constants
my_write_objects() {
write_objects $1 $2 10 1000000 $TEST_POOL
}
setup() {
export CEPH_NUM_OSD=$1
# Start ceph
... | 1,299 | 17.84058 | 94 | sh |
null | ceph-main/src/test/test_str_list.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/str_list.h"
#include "gtest/gtest.h"
// SplitTest is parameterized for list/vector/set
using Types = ::testing::Types<std::list<std::string>,
std::vector<std::string>>;
... | 1,553 | 32.782609 | 70 | cc |
null | ceph-main/src/test/test_stress_watch.cc | #include "include/rados/librados.h"
#include "include/rados/librados.hpp"
#include "include/utime.h"
#include "common/Thread.h"
#include "common/Clock.h"
#include "test/librados/test_cxx.h"
#include "gtest/gtest.h"
#include <semaphore.h>
#include <errno.h>
#include <map>
#include <sstream>
#include <iostream>
#include... | 2,922 | 22.572581 | 70 | cc |
null | ceph-main/src/test/test_striper.cc | #include "gtest/gtest.h"
#include "global/global_context.h"
#include "osdc/Striper.h"
using namespace std;
TEST(Striper, Stripe1)
{
file_layout_t l;
l.object_size = 262144;
l.stripe_unit = 4096;
l.stripe_count = 3;
vector<ObjectExtent> ex;
Striper::file_to_extents(g_ceph_context, 1, &l, 5006035, 46419,... | 1,945 | 20.622222 | 86 | cc |
null | ceph-main/src/test/test_subprocess.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph distributed storage system
*
* Copyright (C) 2015 Mirantis Inc
*
* Author: Mykola Golub <mgolub@mirantis.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the term... | 9,150 | 28.050794 | 94 | cc |
null | ceph-main/src/test/test_texttable.cc | // -*- 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) 2012 Inktank Storage, Inc.
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Lice... | 2,036 | 24.78481 | 80 | cc |
null | ceph-main/src/test/test_trans.cc | // -*- 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 <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 2,052 | 24.345679 | 71 | cc |
null | ceph-main/src/test/test_unfound.sh | #!/usr/bin/env bash
set -x
#
# Creates some unfound objects and then tests finding them.
#
# Includes
source "`dirname $0`/test_common.sh"
TEST_POOL=rbd
# Functions
my_write_objects() {
write_objects $1 $2 10 1000000 $TEST_POOL
}
setup() {
export CEPH_NUM_OSD=$1
# Start ceph
./stop... | 3,137 | 21.414286 | 103 | sh |
null | ceph-main/src/test/test_utime.cc | #include "include/utime.h"
#include "gtest/gtest.h"
#include "include/stringify.h"
#include "common/ceph_context.h"
using namespace std;
TEST(utime_t, localtime)
{
utime_t t(1556122013, 839991182);
string s = stringify(t);
cout << s << std::endl;
// time zone may vary where unit test is run, so be cirsumspect... | 1,839 | 26.058824 | 71 | cc |
null | ceph-main/src/test/test_weighted_shuffle.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "common/weighted_shuffle.h"
#include <array>
#include <map>
#include "gtest/gtest.h"
TEST(WeightedShuffle, Basic) {
std::array<char, 5> choices{'a', 'b', 'c', 'd', 'e'};
std::array<int, 5> weights{100, 50, 2... | 1,340 | 32.525 | 79 | cc |
null | ceph-main/src/test/test_workqueue.cc | #include "gtest/gtest.h"
#include "common/WorkQueue.h"
#include "common/ceph_argparse.h"
using namespace std;
TEST(WorkQueue, StartStop)
{
ThreadPool tp(g_ceph_context, "foo", "tp_foo", 10, "");
tp.start();
tp.pause();
tp.pause_new();
tp.unpause();
tp.unpause();
tp.drain();
tp.stop();
}
TEST(Work... | 2,428 | 23.535354 | 122 | cc |
null | ceph-main/src/test/test_xlist.cc | #include <algorithm>
#include <iterator>
#include <vector>
#include "include/xlist.h"
#include "gtest/gtest.h"
struct Item {
xlist<Item*>::item xitem;
int val;
explicit Item(int v) :
xitem(this),
val(v)
{}
};
class XlistTest : public testing::Test
{
protected:
typedef xlist<Item*> ItemList;
typ... | 2,540 | 20.352941 | 68 | cc |
null | ceph-main/src/test/testclass.cc |
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include "objclass/objclass.h"
CLS_VER(1,0)
CLS_NAME(test)
cls_handle_t h_class;
cls_method_handle_t h_foo;
int foo_method(cls_method_context_t ctx, char *indata, int datalen,
char **outdata, int *outdatalen)
{
int i, r;
cls_log("hello worl... | 1,032 | 16.810345 | 79 | cc |
null | ceph-main/src/test/testcrypto.cc | #include "auth/Crypto.h"
#include "common/Clock.h"
#include "common/config.h"
#include "common/debug.h"
#define dout_subsys ceph_subsys_auth
#define AES_KEY_LEN 16
#define dout_context g_ceph_context
using namespace std;
int main(int argc, char *argv[])
{
char aes_key[AES_KEY_LEN];
memset(aes_key, 0x77, sizeo... | 1,438 | 22.590164 | 69 | cc |
null | ceph-main/src/test/testkeys.cc | #include "auth/cephx/CephxKeyServer.h"
#include "common/ceph_argparse.h"
#include "global/global_init.h"
#include "common/config.h"
#include "common/debug.h"
#define dout_context g_ceph_context
#define AES_KEY_LEN 16
using namespace std;
int main(int argc, const char **argv)
{
auto args = argv_to_vec(argc, argv);... | 1,647 | 22.542857 | 69 | cc |
null | ceph-main/src/test/testmsgr.cc | // -*- 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 <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 3,699 | 24.517241 | 136 | cc |
null | ceph-main/src/test/unit.cc | // -*- 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) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 1,407 | 27.734694 | 80 | cc |
null | ceph-main/src/test/utf8.cc | // -*- 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) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 2,326 | 33.731343 | 83 | cc |
null | ceph-main/src/test/vstart_wrapper.sh | #!/usr/bin/env bash
#
# Copyright (C) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published ... | 2,231 | 28.368421 | 83 | sh |
null | ceph-main/src/test/xattr_bench.cc | // -*- 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 <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 5,204 | 25.42132 | 86 | cc |
null | ceph-main/src/test/ObjectMap/KeyValueDBMemory.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/encoding.h"
#include "KeyValueDBMemory.h"
#include <map>
#include <set>
#include <iostream>
using namespace std;
/**
* Iterate over the whole key space of the in-memory store
*
* @note Removing keys ... | 5,982 | 21.577358 | 99 | cc |
null | ceph-main/src/test/ObjectMap/KeyValueDBMemory.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <map>
#include <set>
#include <string>
#include "kv/KeyValueDB.h"
#include "include/buffer.h"
#include "include/Context.h"
using std::string;
class KeyValueDBMemory : public KeyValueDB {
public:
std::map<std:... | 4,938 | 25.132275 | 110 | h |
null | ceph-main/src/test/ObjectMap/test_keyvaluedb_atomicity.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
#include <pthread.h>
#include "include/buffer.h"
#include "kv/KeyValueDB.h"
#include <sys/types.h>
#include <dirent.h>
#include <string>
#include <vector>
#include <boost/scoped_ptr.hpp>
#include <iostream>
#include <sstream>
#include "stdlib.h"
#in... | 3,191 | 26.282051 | 77 | cc |
null | ceph-main/src/test/ObjectMap/test_keyvaluedb_iterators.cc | // -*- 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) 2012 Inktank, Inc.
*
* 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... | 55,602 | 30.646557 | 123 | cc |
null | ceph-main/src/test/ObjectMap/test_object_map.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
#include <iterator>
#include <map>
#include <set>
#include <boost/scoped_ptr.hpp>
#include "include/buffer.h"
#include "test/ObjectMap/KeyValueDBMemory.h"
#include "kv/KeyValueDB.h"
#include "os/DBObjectMap.h"
#include <sys/types.h>
#include "globa... | 31,252 | 26.731145 | 82 | cc |
null | ceph-main/src/test/centos-8/install-deps.sh | ../../../install-deps.sh | 24 | 24 | 24 | sh |
null | ceph-main/src/test/ceph-erasure-code-tool/test_ceph-erasure-code-tool.sh | #!/bin/sh -ex
TMPDIR=/tmp/test_ceph-erasure-code-tool.$$
mkdir $TMPDIR
trap "rm -fr $TMPDIR" 0
ceph-erasure-code-tool test-plugin-exists INVALID_PLUGIN && exit 1
ceph-erasure-code-tool test-plugin-exists jerasure
ceph-erasure-code-tool validate-profile \
plugin=jerasure,technique=reed_sol_van,... | 1,327 | 29.181818 | 76 | sh |
null | ceph-main/src/test/client/TestClient.h | // -*- 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) 2021 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 4,990 | 32.05298 | 98 | h |
null | ceph-main/src/test/client/alternate_name.cc | // -*- 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) 2021 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 6,354 | 31.09596 | 110 | cc |
null | ceph-main/src/test/client/iozone.sh | #!/usr/bin/env bash
set -e
name=`echo $0 | sed 's/\//_/g'`
mkdir $name
cd $name
iozone -c -e -s 1024M -r 16K -t 1 -F f1 -i 0 -i 1
iozone -c -e -s 1024M -r 1M -t 1 -F f2 -i 0 -i 1
iozone -c -e -s 10240M -r 1M -t 1 -F f3 -i 0 -i 1
cd ..
| 238 | 17.384615 | 49 | sh |
null | ceph-main/src/test/client/kernel_untar_build.sh | #!/usr/bin/env bash
set -e
name=`echo $0 | sed 's/\//_/g'`
mkdir $name
cd $name
tar jxvf /root/linux*
cd linux*
make defconfig
make
cd ..
rm -r linux*
| 153 | 10 | 31 | sh |
null | ceph-main/src/test/client/main.cc | // -*- 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) 2011 New Dream Network
* Copyright (C) 2016 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Les... | 820 | 27.310345 | 108 | cc |
null | ceph-main/src/test/client/ops.cc | // -*- 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) 2022 Red Hat
*
* 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,342 | 28.195652 | 89 | cc |
null | ceph-main/src/test/cls_2pc_queue/test_cls_2pc_queue.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/types.h"
#include "cls/2pc_queue/cls_2pc_queue_types.h"
#include "cls/2pc_queue/cls_2pc_queue_client.h"
#include "cls/queue/cls_queue_client.h"
#include "cls/2pc_queue/cls_2pc_queue_types.h"
#include "... | 35,982 | 36.134159 | 130 | cc |
null | ceph-main/src/test/cls_cas/test_cls_cas.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/types.h"
#include "include/stringify.h"
#include "cls/cas/cls_cas_client.h"
#include "cls/cas/cls_cas_internal.h"
#include "include/utime.h"
#include "common/Clock.h"
#include "global/global_context.h"
... | 8,706 | 22.596206 | 81 | cc |
null | ceph-main/src/test/cls_cmpomap/test_cls_cmpomap.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2020 Red Hat, Inc
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Licen... | 27,120 | 36.615811 | 95 | cc |
null | ceph-main/src/test/cls_hello/test_cls_hello.cc | // -*- 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) 2013 Inktank
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 9,493 | 32.429577 | 91 | cc |
null | ceph-main/src/test/cls_journal/test_cls_journal.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "cls/journal/cls_journal_client.h"
#include "include/stringify.h"
#include "common/Cond.h"
#include "test/librados/test_cxx.h"
#include "gtest/gtest.h"
#include <errno.h>
#include <set>
#include <string>
using n... | 22,225 | 30.933908 | 81 | cc |
null | ceph-main/src/test/cls_lock/test_cls_lock.cc | // -*- 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 <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 16,880 | 27.611864 | 97 | cc |
null | ceph-main/src/test/cls_log/test_cls_log.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/types.h"
#include "cls/log/cls_log_types.h"
#include "cls/log/cls_log_client.h"
#include "include/utime.h"
#include "common/Clock.h"
#include "global/global_context.h"
#include "gtest/gtest.h"
#include... | 9,906 | 24.665803 | 105 | cc |
null | ceph-main/src/test/cls_lua/test_cls_lua.cc | #include <errno.h>
#include <lua.hpp>
#include "include/types.h"
#include "include/rados/librados.hpp"
#include "gtest/gtest.h"
#include "test/librados/test_cxx.h"
#include "cls/lua/cls_lua_client.h"
#include "cls/lua/cls_lua.h"
using namespace std;
/*
* JSON script to test JSON I/O protocol with cls_lua
*/
const s... | 29,635 | 25.723174 | 109 | cc |
null | ceph-main/src/test/cls_numops/test_cls_numops.cc | /*
* Ceph - scalable distributed file system
*
* Copyright (C) 2015 CERN
*
* Author: Joaquim Rocha <joaquim.rocha@cern.ch>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; ei... | 9,859 | 22.759036 | 79 | cc |
null | ceph-main/src/test/cls_queue/test_cls_queue.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/types.h"
#include "cls/queue/cls_queue_types.h"
#include "cls/queue/cls_queue_client.h"
#include "cls/queue/cls_queue_ops.h"
#include "gtest/gtest.h"
#include "test/librados/test_cxx.h"
#include "globa... | 19,661 | 31.338816 | 126 | cc |
null | ceph-main/src/test/cls_rbd/test_cls_rbd.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/compat.h"
#include "common/ceph_context.h"
#include "common/config.h"
#include "common/snap_types.h"
#include "common/Clock.h"
#include "common/bit_vector.hpp"
#include "include/encoding.h"
#include "inc... | 125,005 | 35.455526 | 106 | cc |
null | ceph-main/src/test/cls_refcount/test_cls_refcount.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/types.h"
#include "cls/refcount/cls_refcount_client.h"
#include "gtest/gtest.h"
#include "test/librados/test_cxx.h"
#include <errno.h>
#include <string>
#include <vector>
using namespace std;
static ... | 18,789 | 23.120668 | 119 | cc |
null | ceph-main/src/test/cls_rgw/test_cls_rgw.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/types.h"
#include "cls/rgw/cls_rgw_client.h"
#include "cls/rgw/cls_rgw_ops.h"
#include "gtest/gtest.h"
#include "test/librados/test_cxx.h"
#include "global/global_context.h"
#include "common/ceph_contex... | 40,907 | 29.460164 | 120 | cc |
null | ceph-main/src/test/cls_rgw/test_cls_rgw_stats.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <vector>
#include <boost/circular_buffer.hpp>
#include <boost/intrusive/set.hpp>
#include <gtest/gtest.h>
#include "cls/rgw/cls_rgw_client.h"
#include "common/debug.h"
#include "common/dout.h"
#include "common/er... | 20,798 | 31.146832 | 81 | cc |
null | ceph-main/src/test/cls_rgw_gc/test_cls_rgw_gc.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/types.h"
#include "cls/rgw/cls_rgw_types.h"
#include "cls/rgw_gc/cls_rgw_gc_client.h"
#include "cls/rgw_gc/cls_rgw_gc_ops.h"
#include "gtest/gtest.h"
#include "test/librados/test_cxx.h"
#include "globa... | 19,975 | 27.496434 | 119 | cc |
null | ceph-main/src/test/cls_sdk/test_cls_sdk.cc | #include <iostream>
#include <errno.h>
#include "test/librados/test_cxx.h"
#include "gtest/gtest.h"
using namespace librados;
TEST(ClsSDK, TestSDKCoverageWrite) {
Rados cluster;
std::string pool_name = get_temp_pool_name();
ASSERT_EQ("", create_one_pool_pp(pool_name, cluster));
IoCtx ioctx;
cluster.ioctx_c... | 984 | 26.361111 | 79 | cc |
null | ceph-main/src/test/cls_version/test_cls_version.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/rados/librados.hpp"
#include "include/types.h"
#include "cls/version/cls_version_types.h"
#include "cls/version/cls_version_client.h"
#include "gtest/gtest.h"
#include "test/librados/test_cxx.h"
#incl... | 7,728 | 22.928793 | 70 | cc |
null | ceph-main/src/test/common/ObjectContents.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
#include "ObjectContents.h"
#include "include/buffer.h"
#include <iostream>
#include <map>
bool test_object_contents()
{
ObjectContents c, d;
ceph_assert(!c.exists());
c.debug(std::cerr);
c.write(10, 10, 10);
ceph_assert(c.exists());
ce... | 3,150 | 23.426357 | 72 | cc |
null | ceph-main/src/test/common/ObjectContents.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
#include "include/interval_set.h"
#include "include/buffer_fwd.h"
#include <map>
#ifndef COMMON_OBJECT_H
#define COMMON_OBJECT_H
enum {
RANDOMWRITEFULL,
DELETED,
CLONERANGE
};
bool test_object_contents();
class ObjectContents {
uint64_t ... | 2,837 | 22.073171 | 70 | h |
null | ceph-main/src/test/common/Readahead.cc | // -*- 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) 2014 Adam Crume <adamcrume@gmail.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Pub... | 5,616 | 41.233083 | 95 | cc |
null | ceph-main/src/test/common/Throttle.cc | // -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
*
* Author: Loic Dachary <loic@dachary.org>
*
* This program is free software; you can redistribute it an... | 9,135 | 22.607235 | 71 | cc |
null | ceph-main/src/test/common/dns_messages.h | // -*- 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) 2016 SUSE LINUX GmbH
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ve... | 5,042 | 48.930693 | 80 | h |
null | ceph-main/src/test/common/dns_resolve.cc | // -*- 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) 2016 SUSE LINUX GmbH
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ve... | 8,965 | 32.962121 | 93 | cc |
null | ceph-main/src/test/common/get_command_descriptions.cc | // -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
*
* Author: Loic Dachary <loic@dachary.org>
*
* This program is free software; you can redistribute it an... | 4,018 | 29.44697 | 83 | cc |
null | ceph-main/src/test/common/histogram.cc | // -*- 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) 2014 Inktank <info@inktank.com>
*
* LGPL-2.1 (see COPYING-LGPL2.1) or later
*/
#include <iostream>
#include <gtest/gtest.h>
#include "common/histogram.... | 2,478 | 18.069231 | 70 | cc |
null | ceph-main/src/test/common/test_allocate_unique.cc | // -*- 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) 2020 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 2,523 | 24.755102 | 81 | cc |
null | ceph-main/src/test/common/test_async_completion.cc | // -*- 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) 2018 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 6,662 | 24.92607 | 87 | cc |
null | ceph-main/src/test/common/test_async_shared_mutex.cc | // -*- 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) 2018 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 10,729 | 24.011655 | 78 | cc |
null | ceph-main/src/test/common/test_back_trace.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <boost/algorithm/string.hpp>
#include <gtest/gtest.h>
#include <regex>
#include <sstream>
#include <string>
#include "common/BackTrace.h"
#include "common/version.h"
// a dummy function, so we can check "foo" i... | 1,219 | 26.111111 | 77 | cc |
null | ceph-main/src/test/common/test_bit_vector.cc | // -*- 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) 2014 Red Hat <contact@redhat.com>
*
* LGPL-2.1 (see COPYING-LGPL2.1) or later
*/
#include <gtest/gtest.h>
#include <cmath>
#include "common/bit_vector.h... | 9,607 | 30.093851 | 80 | cc |
null | ceph-main/src/test/common/test_blkdev.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <linux/kdev_t.h>
#include "include/types.h"
#include "common/blkdev.h"
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include <iostream>
using nam... | 2,842 | 23.721739 | 125 | cc |
null | ceph-main/src/test/common/test_blocked_completion.cc | // -*- 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) 2018 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 6,678 | 27.063025 | 89 | cc |
null | ceph-main/src/test/common/test_bloom_filter.cc | // -*- 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) 2013 Inktank <info@inktank.com>
*
* LGPL-2.1 (see COPYING-LGPL2.1) or later
*/
#include <iostream>
#include <gtest/gtest.h>
#include "include/stringify... | 8,924 | 26.546296 | 119 | cc |
null | ceph-main/src/test/common/test_bounded_key_counter.cc | // -*- 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) 2015 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 6,744 | 32.557214 | 77 | cc |
null | ceph-main/src/test/common/test_cdc.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <vector>
#include <cstring>
#include <random>
#include "include/types.h"
#include "include/buffer.h"
#include "common/CDC.h"
#include "gtest/gtest.h"
using namespace std;
class CDCTest : public ::testing::Tes... | 4,405 | 25.865854 | 313 | cc |
null | ceph-main/src/test/common/test_ceph_timer.cc | // -*- 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) 2020 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 3,547 | 20.634146 | 70 | cc |
null | ceph-main/src/test/common/test_config.cc | // -*- 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) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
*
* Author: Loic Dachary <loic@dachary.org>
*
* This program is free software; you can redistribute it an... | 10,802 | 33.404459 | 85 | cc |
null | ceph-main/src/test/common/test_context.cc | // -*- 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) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
*
* Author: Loic Dachary <loic@dachary.org>
*
* This program is free software; you can redistribute it an... | 4,922 | 32.719178 | 315 | cc |
null | ceph-main/src/test/common/test_convenience.cc | // -*- 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) 2017 Red Hat, Inc.
*
* Author: Casey Bodley <cbodley@redhat.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms ... | 1,756 | 24.1 | 81 | cc |
null | ceph-main/src/test/common/test_counter.cc | #include "common/DecayCounter.h"
#include <gtest/gtest.h>
#include <list>
#include <cmath>
TEST(DecayCounter, steady)
{
static const double duration = 2.0;
static const double max = 2048.0;
static const double rate = 3.5;
DecayCounter d{DecayRate{rate}};
d.hit(max);
const auto start = DecayCounter::cloc... | 998 | 23.365854 | 74 | cc |
null | ceph-main/src/test/common/test_crc32c.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <iostream>
#include <string.h>
#include "include/types.h"
#include "include/crc32c.h"
#include "include/utime.h"
#include "common/Clock.h"
#include "gtest/gtest.h"
#include "common/sctp_crc32.h"
#include "comm... | 19,624 | 52.620219 | 97 | cc |
null | ceph-main/src/test/common/test_fair_mutex.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*-
#include <array>
#include <mutex>
#include <numeric>
#include <future>
#include <gtest/gtest.h>
#include "common/fair_mutex.h"
TEST(FairMutex, simple)
{
ceph::fair_mutex mutex{"fair::simple"};
{
std::unique_lock lock{mutex};
ASSERT_T... | 2,229 | 31.318841 | 81 | cc |
null | ceph-main/src/test/common/test_fault_injector.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2020 Red Hat, Inc.
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Licen... | 6,477 | 25.016064 | 79 | cc |
null | ceph-main/src/test/common/test_global_doublefree.cc | // -*- 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) 2016 Red Hat, Inc.
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License vers... | 863 | 26.870968 | 78 | cc |
null | ceph-main/src/test/common/test_hobject.cc | #include "common/hobject.h"
#include "gtest/gtest.h"
TEST(HObject, cmp)
{
hobject_t c{object_t{"fooc"}, "food", CEPH_NOSNAP, 42, 0, "nspace"};
hobject_t d{object_t{"food"}, "", CEPH_NOSNAP, 42, 0, "nspace"};
hobject_t e{object_t{"fooe"}, "food", CEPH_NOSNAP, 42, 0, "nspace"};
ASSERT_EQ(-1, cmp(c, d));
AS... | 346 | 27.916667 | 70 | cc |
null | ceph-main/src/test/common/test_hostname.cc | // -*- 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 <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 1,907 | 25.5 | 81 | cc |
null | ceph-main/src/test/common/test_interval_map.cc | // -*- 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) 2016 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 8,143 | 23.094675 | 77 | cc |
null | ceph-main/src/test/common/test_interval_set.cc | // -*- 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) 2015 Mirantis, Inc.
*
* Author: Igor Fedotov <ifedotov@mirantis.com>
*
* This is free software; you can redistribute it and/or
* modify it under the te... | 17,188 | 27.600666 | 91 | cc |
null | ceph-main/src/test/common/test_intrusive_lru.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <stdio.h>
#include "gtest/gtest.h"
#include "common/intrusive_lru.h"
template <typename TestLRUItem>
struct item_to_unsigned {
using type = unsigned;
const type &operator()(const TestLRUItem &item) {
ret... | 4,551 | 20.779904 | 70 | cc |
null | ceph-main/src/test/common/test_iso_8601.cc | // -*- 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) 2017 Red Hat <contact@redhat.com>
*
* LGPL-2.1 (see COPYING-LGPL2.1) or later
*/
#include <chrono>
#include <gtest/gtest.h>
#include "common/ceph_time... | 1,913 | 30.377049 | 77 | cc |
null | ceph-main/src/test/common/test_journald_logger.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <cerrno>
#include <gtest/gtest.h>
#include <sys/stat.h>
#include "common/Journald.h"
#include "log/Entry.h"
#include "log/SubsystemMap.h"
using namespace ceph::logging;
class JournaldLoggerTest : public ::test... | 1,007 | 23 | 70 | cc |
null | ceph-main/src/test/common/test_json_formattable.cc | // -*- 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) 2018 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* L... | 10,548 | 22.235683 | 106 | cc |
null | ceph-main/src/test/common/test_json_formatter.cc | // -*- 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) 2018 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* L... | 4,218 | 50.45122 | 2,322 | cc |
null | ceph-main/src/test/common/test_lockdep.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "gtest/gtest.h"
#include "common/ceph_argparse.h"
#include "common/ceph_context.h"
#include "common/ceph_mutex.h"
#include "common/common_init.h"
#include "common/lockdep.h"
#include "include/util.h"
#include "i... | 1,749 | 22.333333 | 86 | cc |
null | ceph-main/src/test/common/test_lru.cc | // -*- 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) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
*
* Author: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
*
* This library is free software; ... | 4,085 | 24.698113 | 70 | cc |
null | ceph-main/src/test/common/test_lruset.cc | // -*- 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) 2013 Inktank <info@inktank.com>
*
* LGPL-2.1 (see COPYING-LGPL2.1) or later
*/
#include <iostream>
#include <gtest/gtest.h>
#include "common/LRUSet.h"
... | 1,998 | 17.172727 | 70 | cc |
null | ceph-main/src/test/common/test_mclock_priority_queue.cc | // -*- 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) 2017 Red Hat Inc.
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License versi... | 7,214 | 21.476636 | 78 | cc |
null | ceph-main/src/test/common/test_mutex_debug.cc | // -*- 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) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License versio... | 2,399 | 22.529412 | 70 | cc |
null | ceph-main/src/test/common/test_numa.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "gtest/gtest.h"
#include "common/numa.h"
TEST(cpu_set, parse_list) {
cpu_set_t cpu_set;
size_t size;
ASSERT_EQ(0, parse_cpu_set_list("0-3", &size, &cpu_set));
ASSERT_EQ(size, 4u);
for (unsigned i = 0;... | 1,942 | 25.616438 | 70 | cc |
null | ceph-main/src/test/common/test_option.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*-
// vim: ts=8 sw=2 smarttab expandtab
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <gtest/gtest.h>
#include "common/options.h"
using namespace std;
TEST(Option, validate_min_max)
{
auto opt = Option{"foo", Option::TYPE... | 1,707 | 22.081081 | 74 | cc |
null | ceph-main/src/test/common/test_perf_counters_key.cc | #include "common/perf_counters_key.h"
#include <gtest/gtest.h>
namespace ceph::perf_counters {
TEST(PerfCounters, key_create)
{
EXPECT_EQ(key_create(""),
std::string_view("\0", 1));
EXPECT_EQ(key_create("perf"),
std::string_view("perf\0", 5));
EXPECT_EQ(key_create("perf", {{"",""}}),
... | 3,984 | 29.653846 | 73 | cc |