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/erasure-code/TestErasureCodeShec_all.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,2015 FUJITSU LIMITED * * Author: Shotaro Kawaguchi <kawaguchi.s@jp.fujitsu.com> * Author: Takanori Nakao <nakao.takanori@jp.fujitsu.com> * Author: ...
9,076
26.258258
89
cc
null
ceph-main/src/test/erasure-code/TestErasureCodeShec_arguments.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 FUJITSU LIMITED * * Author: Shotaro Kawaguchi <kawaguchi.s@jp.fujitsu.com> * Author: Takanori Nakao <nakao.takanori@jp.fujitsu.com> * Author: Takes...
11,876
31.013477
96
cc
null
ceph-main/src/test/erasure-code/TestErasureCodeShec_thread.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,2015 FUJITSU LIMITED * * Author: Shotaro Kawaguchi <kawaguchi.s@jp.fujitsu.com> * Author: Takanori Nakao <nakao.takanori@jp.fujitsu.com> * Author: ...
5,809
25.409091
90
cc
null
ceph-main/src/test/erasure-code/ceph_erasure_code_benchmark.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) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com> * Copyright (C) 2014 Red Hat <contact@redhat.com> * * Author: Loic Dachary <loic@dachary.org> * * This lib...
10,659
29.028169
94
cc
null
ceph-main/src/test/erasure-code/ceph_erasure_code_benchmark.h
// -*- 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) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com> * Copyright (C) 2014 Red Hat <contact@redhat.com> * * Author: Loic Dachary <loic@dachary.org> * * This lib...
1,482
22.539683
74
h
null
ceph-main/src/test/erasure-code/ceph_erasure_code_non_regression.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph distributed storage system * * Red Hat (C) 2014, 2015 Red Hat <contact@redhat.com> * * Author: Loic Dachary <loic@dachary.org> * * This library is free software; you can redistribute it and/or * modify ...
9,521
28.030488
101
cc
null
ceph-main/src/test/exporter/test_exporter.cc
#include "gtest/gtest.h" #include "exporter/util.h" #include <string> #include <vector> #include <utility> // 17.2.6's memento mori: // This data was gathered from the python implementation of the promethize method // where we transform the path of a counter to a valid prometheus name. static std::vector<std::pair<st...
43,530
64.46015
106
cc
null
ceph-main/src/test/fedora-33/install-deps.sh
../../../install-deps.sh
24
24
24
sh
null
ceph-main/src/test/fio/fio_ceph_messenger.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * CEPH messenger engine * * FIO engine which uses ceph messenger as a transport. See corresponding * FIO client and server jobs for details. */ #include "global/global_init.h" #include "msg/Messenger.h" #inclu...
18,120
24.850214
119
cc
null
ceph-main/src/test/fio/fio_ceph_objectstore.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph ObjectStore engine * * IO engine using Ceph's ObjectStore class to test low-level performance of * Ceph OSDs. * */ #include <memory> #include <system_error> #include <vector> #include <fstream> #include ...
29,440
30.220573
92
cc
null
ceph-main/src/test/fio/fio_librgw.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, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ver...
15,229
27.151571
82
cc
null
ceph-main/src/test/fio/ring_buffer.h
/* * Very simple and fast lockless ring buffer implementatation for * one producer and one consumer. */ #include <stdint.h> #include <stddef.h> /* Do not overcomplicate, choose generic x86 case */ #define L1_CACHE_BYTES 64 #define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) struct ring_buffer...
2,420
22.504854
80
h
null
ceph-main/src/test/fs/mds_types.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 * * Author: Greg Farnum <greg@inktank.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GN...
5,344
20.126482
70
cc
null
ceph-main/src/test/fs/test_ino_release_cb.cc
#include <string> #include <unistd.h> #include <include/fs_types.h> #include <mds/mdstypes.h> #include <include/cephfs/libcephfs.h> #define MAX_CEPH_FILES 1000 #define DIRNAME "ino_release_cb" using namespace std; static std::atomic<bool> cb_done = false; static void cb(void *hdl, vinodeno_t vino) { cb_done = tru...
1,785
20.011765
70
cc
null
ceph-main/src/test/fs/test_trim_caps.cc
#define _FILE_OFFSET_BITS 64 #if defined(__linux__) #include <features.h> #endif #include <sys/types.h> #include <sys/stat.h> #include <sys/wait.h> #include <fcntl.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <assert.h> #include <unistd.h> #include <include/cephfs/libcephfs.h>...
1,739
19.232558
56
cc
null
ceph-main/src/test/immutable_object_cache/MockCacheDaemon.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef IMMUTABLE_OBJECT_CACHE_MOCK_DAEMON #define IMMUTABLE_OBJECT_CACHE_MOCK_DAEMON #include <iostream> #include <unistd.h> #include "gmock/gmock.h" #include "include/Context.h" #include "tools/immutable_object_cache...
1,237
25.913043
77
h
null
ceph-main/src/test/immutable_object_cache/test_DomainSocket.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <iostream> #include <unistd.h> #include "gtest/gtest.h" #include "include/Context.h" #include "global/global_init.h" #include "global/global_context.h" #include "test/immutable_object_cache/test_common.h" #incl...
5,323
28.910112
103
cc
null
ceph-main/src/test/immutable_object_cache/test_SimplePolicy.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <sstream> #include <list> #include <gtest/gtest.h> #include "include/Context.h" #include "tools/immutable_object_cache/SimplePolicy.h" using namespace ceph::immutable_obj_cache; std::string generate_file_name(...
12,207
50.728814
102
cc
null
ceph-main/src/test/immutable_object_cache/test_common.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CACHE_TEST_COMMON_H #define CACHE_TEST_COMMON_H #include <pthread.h> class WaitEvent { public: WaitEvent() : m_signaled(false) { pthread_mutex_init(&m_lock, NULL); pthread_cond_init(&m_cond, NULL); } ...
846
19.166667
70
h
null
ceph-main/src/test/immutable_object_cache/test_main.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 "global/global_context.h" #include "test/librados/test_cxx.h" #include "gtest/gtest.h" #include <iostream> #include <string> int main(int argc, char **argv) { ::testing::I...
728
23.3
70
cc
null
ceph-main/src/test/immutable_object_cache/test_message.cc
#include "gtest/gtest.h" #include "tools/immutable_object_cache/Types.h" #include "tools/immutable_object_cache/SocketCommon.h" using namespace ceph::immutable_obj_cache; TEST(test_for_message, test_1) { std::string pool_nspace("this is a pool namespace"); std::string oid_name("this is a oid name"); std::strin...
1,963
37.509804
90
cc
null
ceph-main/src/test/immutable_object_cache/test_multi_session.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <iostream> #include <unistd.h> #include "gtest/gtest.h" #include "include/Context.h" #include "global/global_init.h" #include "global/global_context.h" #include "test/immutable_object_cache/test_common.h" #inclu...
4,948
29.361963
93
cc
null
ceph-main/src/test/immutable_object_cache/test_object_store.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <filesystem> #include <iostream> #include <unistd.h> #include "gtest/gtest.h" #include "include/Context.h" #include "include/rados/librados.hpp" #include "include/rbd/librbd.hpp" #include "librbd/ImageCtx.h" #i...
3,068
29.69
100
cc
null
ceph-main/src/test/journal/RadosTestFixture.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "test/librados/test_cxx.h" #include "test/journal/RadosTestFixture.h" #include "cls/journal/cls_journal_client.h" #include "include/stringify.h" #include "common/WorkQueue.h" #include "journal/Settings.h" using ...
4,199
29.882353
95
cc
null
ceph-main/src/test/journal/RadosTestFixture.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "test/librados/test.h" #include "common/ceph_mutex.h" #include "common/Timer.h" #include "journal/JournalMetadata.h" #include "cls/journal/cls_journal_types.h" #include "gtest/gtest.h" class ThreadPool; class R...
2,386
30.826667
86
h
null
ceph-main/src/test/journal/test_Entry.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "journal/Entry.h" #include "gtest/gtest.h" class TestEntry : public ::testing::Test { }; TEST_F(TestEntry, DefaultConstructor) { journal::Entry entry; ASSERT_EQ(0U, entry.get_entry_tid()); ASSERT_EQ(0U, e...
2,392
23.670103
75
cc
null
ceph-main/src/test/journal/test_FutureImpl.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "journal/FutureImpl.h" #include "common/Cond.h" #include "gtest/gtest.h" #include "test/journal/RadosTestFixture.h" class TestFutureImpl : public RadosTestFixture { public: struct FlushHandler : public journal...
7,631
27.371747
86
cc
null
ceph-main/src/test/journal/test_JournalMetadata.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "journal/JournalMetadata.h" #include "test/journal/RadosTestFixture.h" #include "common/Cond.h" #include <map> class TestJournalMetadata : public RadosTestFixture { public: void TearDown() override { for (...
6,965
32.014218
77
cc
null
ceph-main/src/test/journal/test_JournalPlayer.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "journal/JournalPlayer.h" #include "journal/Entry.h" #include "journal/JournalMetadata.h" #include "journal/ReplayHandler.h" #include "include/stringify.h" #include "common/ceph_mutex.h" #include "gtest/gtest.h" ...
31,562
30.689759
96
cc
null
ceph-main/src/test/journal/test_JournalRecorder.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "journal/JournalRecorder.h" #include "journal/Entry.h" #include "journal/JournalMetadata.h" #include "test/journal/RadosTestFixture.h" #include <limits> #include <list> #include <memory> class TestJournalRecorde...
5,450
30.148571
93
cc
null
ceph-main/src/test/journal/test_JournalTrimmer.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "journal/JournalTrimmer.h" #include "journal/JournalMetadata.h" #include "include/stringify.h" #include "test/journal/RadosTestFixture.h" #include <limits> #include <list> class TestJournalTrimmer : public Rados...
6,515
31.909091
98
cc
null
ceph-main/src/test/journal/test_Journaler.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/stringify.h" #include "journal/Journaler.h" #include "journal/Settings.h" #include "test/librados/test.h" #include "test/journal/RadosTestFixture.h" #include "gtest/gtest.h" // reinclude our assert t...
5,506
26.673367
79
cc
null
ceph-main/src/test/journal/test_ObjectPlayer.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "journal/ObjectPlayer.h" #include "journal/Entry.h" #include "include/stringify.h" #include "common/Timer.h" #include "gtest/gtest.h" #include "test/librados/test.h" #include "test/journal/RadosTestFixture.h" te...
8,088
27.684397
89
cc
null
ceph-main/src/test/journal/test_ObjectRecorder.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "journal/ObjectRecorder.h" #include "common/Cond.h" #include "common/ceph_mutex.h" #include "common/Timer.h" #include "gtest/gtest.h" #include "test/librados/test.h" #include "test/journal/RadosTestFixture.h" #in...
15,613
32.578495
80
cc
null
ceph-main/src/test/journal/test_main.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_crypto.h" #include "common/config_proxy.h" #include "global/global_context.h" #include "global/global_init.h" #include <vector> int main(in...
668
23.777778
70
cc
null
ceph-main/src/test/journal/mock/MockJournaler.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "MockJournaler.h" namespace journal { MockFuture *MockFuture::s_instance = nullptr; MockReplayEntry *MockReplayEntry::s_instance = nullptr; MockJournaler *MockJournaler::s_instance = nullptr; std::ostream &ope...
415
23.470588
72
cc
null
ceph-main/src/test/journal/mock/MockJournaler.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef TEST_RBD_MIRROR_MOCK_JOURNALER_H #define TEST_RBD_MIRROR_MOCK_JOURNALER_H #include <gmock/gmock.h> #include "include/int_types.h" #include "include/rados/librados.hpp" #include "cls/journal/cls_journal_types.h" #...
10,179
31.420382
88
h
null
ceph-main/src/test/lazy-omap-stats/lazy_omap_stats_test.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) 2019 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....
17,314
26.837621
88
cc
null
ceph-main/src/test/lazy-omap-stats/lazy_omap_stats_test.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) 2019 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,632
28.58427
71
h
null
ceph-main/src/test/lazy-omap-stats/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) 2019 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....
537
23.454545
70
cc
null
ceph-main/src/test/libcephfs/access.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 ...
14,016
34.0425
88
cc
null
ceph-main/src/test/libcephfs/acl.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 ...
11,920
31.394022
108
cc
null
ceph-main/src/test/libcephfs/caps.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,644
26.552083
78
cc
null
ceph-main/src/test/libcephfs/ceph_pthread_self.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_TEST_LIBCEPHFS_PTHREAD_SELF #define CEPH_TEST_LIBCEPHFS_PTHREAD_SELF #include <pthread.h> #include <type_traits> /* * There is a difference between libc shipped with FreeBSD and * glibc shipped with GNU...
958
28.96875
73
h
null
ceph-main/src/test/libcephfs/deleg.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Tests for Ceph delegation handling * * (c) 2017, Jeff Layton <jlayton@redhat.com> */ #include "gtest/gtest.h" #include "include/compat.h" #include "include/cephfs/libcephfs.h" #include "include/fs_types.h" #inclu...
13,454
32.470149
120
cc
null
ceph-main/src/test/libcephfs/flock.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 ...
19,512
28.79084
83
cc
null
ceph-main/src/test/libcephfs/lazyio.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) 2019 Red Hat Ltd * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License versio...
12,730
34.661064
202
cc
null
ceph-main/src/test/libcephfs/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...
1,108
20.745098
70
cc
null
ceph-main/src/test/libcephfs/monconfig.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,854
26.990196
75
cc
null
ceph-main/src/test/libcephfs/multiclient.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 ...
5,089
27.121547
81
cc
null
ceph-main/src/test/libcephfs/newops.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 Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License versi...
2,418
26.488636
133
cc
null
ceph-main/src/test/libcephfs/quota.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) 2022 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the G...
6,023
34.857143
120
cc
null
ceph-main/src/test/libcephfs/readdir_r_cb.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,223
32.69697
72
cc
null
ceph-main/src/test/libcephfs/reclaim.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Tests for Ceph delegation handling * * (c) 2017, Jeff Layton <jlayton@redhat.com> */ #include "gtest/gtest.h" #include "include/compat.h" #include "include/cephfs/libcephfs.h" #include "include/fs_types.h" #inclu...
3,627
21.121951
80
cc
null
ceph-main/src/test/libcephfs/recordlock.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 * 2016 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Les...
31,209
27.218807
91
cc
null
ceph-main/src/test/libcephfs/snapdiff.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 * * * 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 So...
57,060
32.864095
92
cc
null
ceph-main/src/test/libcephfs/suidsgid.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) 2023 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...
10,664
31.123494
113
cc
null
ceph-main/src/test/libcephfs/test.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 ...
127,923
32.824432
131
cc
null
ceph-main/src/test/libcephfs/vxattr.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 Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License versi...
11,147
27.880829
141
cc
null
ceph-main/src/test/libcephsqlite/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) 2021 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 versio...
33,382
28.542478
120
cc
null
ceph-main/src/test/librados/TestCase.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <errno.h> #include <fmt/format.h> #include "test/librados/test.h" #include "test/librados/TestCase.h" #include "include/scope_guard.h" #include "crimson_utils.h" std::string RadosTestNS::pool_name; rados_t Rados...
5,553
26.22549
106
cc
null
ceph-main/src/test/librados/TestCase.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_TEST_RADOS_TESTCASE_H #define CEPH_TEST_RADOS_TESTCASE_H #include "include/rados/librados.h" #include "gtest/gtest.h" #include <string> /** * These test cases create a temporary pool that lives as long as...
3,255
25.048
71
h
null
ceph-main/src/test/librados/aio.cc
#include <errno.h> #include <fcntl.h> #include <string> #include <sstream> #include <utility> #include <boost/scoped_ptr.hpp> #include <fmt/format.h> #include "include/err.h" #include "include/rados/librados.h" #include "include/types.h" #include "include/stringify.h" #include "include/scope_guard.h" #include "common...
58,346
32.824348
122
cc
null
ceph-main/src/test/librados/aio_cxx.cc
#include <errno.h> #include <fcntl.h> #include <sstream> #include <string> #include <utility> #include <boost/scoped_ptr.hpp> #include <fmt/format.h> #include "gtest/gtest.h" #include "common/errno.h" #include "include/err.h" #include "include/rados/librados.hpp" #include "include/types.h" #include "include/stringify...
82,588
32.463938
107
cc
null
ceph-main/src/test/librados/asio.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 vers...
10,242
26.683784
80
cc
null
ceph-main/src/test/librados/c_read_operations.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // Tests for the C API coverage of atomic read operations #include <cstring> // For memcpy #include <errno.h> #include <string> #include "include/buffer.h" #include "include/denc.h" #include "include/err.h" #include "include/rados/librados.h" #inc...
29,256
31.652902
90
cc
null
ceph-main/src/test/librados/c_write_operations.cc
// Tests for the C API coverage of atomic write operations #include <errno.h> #include "gtest/gtest.h" #include "include/err.h" #include "include/rados/librados.h" #include "test/librados/test.h" TEST(LibradosCWriteOps, NewDelete) { rados_write_op_t op = rados_create_write_op(); ASSERT_TRUE(op); rados_release_w...
10,088
33.316327
96
cc
null
ceph-main/src/test/librados/cls.cc
#include <errno.h> #include <map> #include <sstream> #include <string> #include "gtest/gtest.h" #include "include/rados/librados.hpp" #include "test/librados/test_cxx.h" using namespace librados; using std::map; using std::ostringstream; using std::string; TEST(LibRadosCls, DNE) { Rados cluster; std::string poo...
907
23.540541
86
cc
null
ceph-main/src/test/librados/cls_remote_reads.cc
#include <set> #include <string> #include "common/ceph_json.h" #include "gtest/gtest.h" #include "test/librados/test_cxx.h" #include "crimson_utils.h" using namespace librados; TEST(ClsTestRemoteReads, TestGather) { SKIP_IF_CRIMSON(); Rados cluster; std::string pool_name = get_temp_pool_name(); ASSERT_EQ(""...
1,812
31.375
97
cc
null
ceph-main/src/test/librados/cmd.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/rados/librados.h" #include "include/rados/librados.hpp" #include "include/stringify.h" #include "test/librados/test.h" #include "gtest/gtest.h" #include <errno.h> #include <condition_variable> #include ...
7,556
31.856522
109
cc
null
ceph-main/src/test/librados/cmd_cxx.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <errno.h> #include <condition_variable> #include <map> #include <sstream> #include <string> #include "gtest/gtest.h" #include "include/rados/librados.hpp" #include "include/stringify.h" #include "test/librados/...
2,618
27.16129
86
cc
null
ceph-main/src/test/librados/completion_speed.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 "common/ceph_context.h" #include "common/Finisher.h" #include "librados/AioCompletionImpl.h" constexpr int max_completions = 10'000'000; int completed = 0; auto cct = (new ...
1,075
26.589744
72
cc
null
ceph-main/src/test/librados/crimson_utils.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <cstdlib> static inline bool is_crimson_cluster() { return getenv("CRIMSON_COMPAT") != nullptr; } #define SKIP_IF_CRIMSON() \ if (is_crimson_cluster()) { \ GTEST_SKIP()...
371
22.25
70
h
null
ceph-main/src/test/librados/io.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -* // vim: ts=8 sw=2 smarttab #include <climits> #include "include/rados/librados.h" #include "include/encoding.h" #include "include/err.h" #include "include/scope_guard.h" #include "test/librados/test.h" #include "test/librados/TestCase.h" #include ...
15,525
32.606061
124
cc
null
ceph-main/src/test/librados/io_cxx.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -* // vim: ts=8 sw=2 smarttab #include <climits> #include <errno.h> #include "gtest/gtest.h" #include "include/rados/librados.hpp" #include "include/encoding.h" #include "include/err.h" #include "include/scope_guard.h" #include "test/librados/test_cx...
30,243
29.642351
88
cc
null
ceph-main/src/test/librados/librados.cc
//#include "common/config.h" #include "include/rados/librados.h" #include "gtest/gtest.h" TEST(Librados, CreateShutdown) { rados_t cluster; int err; err = rados_create(&cluster, "someid"); EXPECT_EQ(err, 0); rados_shutdown(cluster); }
248
16.785714
41
cc
null
ceph-main/src/test/librados/librados_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) 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,427
23.525253
70
cc
null
ceph-main/src/test/librados/list.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/rados/librados.h" #include "include/rados/librados.hpp" #include "include/stringify.h" #include "test/librados/test.h" #include "test/librados/test_common.h" #include "test/librados/TestCase.h" #include "...
18,654
32.552158
103
cc
null
ceph-main/src/test/librados/list_cxx.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <errno.h> #include <string> #include <stdexcept> #include "gtest/gtest.h" #include "include/rados/librados.hpp" #include "include/stringify.h" #include "include/types.h" #include "common/hobject.h" #include "tes...
23,354
28.827586
101
cc
null
ceph-main/src/test/librados/lock.cc
#include "include/rados/librados.h" #include "test/librados/test.h" #include "test/librados/TestCase.h" #include "cls/lock/cls_lock_client.h" #include <algorithm> #include <chrono> #include <thread> #include <errno.h> #include "gtest/gtest.h" #include <sys/time.h> #include "crimson_utils.h" using namespace std::chro...
9,180
37.57563
167
cc
null
ceph-main/src/test/librados/lock_cxx.cc
#include <algorithm> #include <chrono> #include <thread> #include <errno.h> #include <sys/time.h> #include "gtest/gtest.h" #include "include/rados/librados.hpp" #include "cls/lock/cls_lock_client.h" #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" #include "crimson_utils.h" using namespac...
7,369
35.127451
102
cc
null
ceph-main/src/test/librados/misc.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 "mds/mdstypes.h" #include "include/err.h" #include "include/buffer.h" #include "include/rbd_types.h" #include "include/rados.h" #include "include/rados/librados.h" #include "include/rados...
11,343
31.135977
80
cc
null
ceph-main/src/test/librados/misc_cxx.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <errno.h> #include <map> #include <sstream> #include <string> #include <regex> #include "gtest/gtest.h" #include "include/err.h" #include "include/buffer.h" #include "include/rbd_types.h" #include "include/rados...
26,649
27.841991
92
cc
null
ceph-main/src/test/librados/op_speed.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -* // vim: ts=8 sw=2 smarttab #include <cstdint> #include "include/rados/librados.hpp" constexpr int to_create = 10'000'000; int main() { for (int i = 0; i < to_create; ++i) { librados::ObjectReadOperation op; bufferlist bl; std::uint6...
637
24.52
69
cc
null
ceph-main/src/test/librados/pool.cc
#include <errno.h> #include <vector> #include "crimson_utils.h" #include "gtest/gtest.h" #include "include/rados/librados.h" #include "test/librados/test.h" #define POOL_LIST_BUF_SZ 32768 TEST(LibRadosPools, PoolList) { char pool_list_buf[POOL_LIST_BUF_SZ]; char *buf = pool_list_buf; rados_t cluster; std::str...
6,540
33.97861
91
cc
null
ceph-main/src/test/librados/service.cc
#include "include/rados/librados.h" #include "include/rados/librados.hpp" #include "include/stringify.h" #include "common/config_proxy.h" #include "test/librados/test.h" #include "test/librados/TestCase.h" #ifndef _WIN32 #include <sys/resource.h> #endif #include <mutex> #include <condition_variable> #include <algorith...
6,615
30.504762
77
cc
null
ceph-main/src/test/librados/service_cxx.cc
#include <algorithm> #include <thread> #include <errno.h> #include "gtest/gtest.h" #include "include/rados/librados.hpp" #include "include/stringify.h" #include "common/config_proxy.h" #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" #include "test/unit.cc" using namespace std; using namesp...
3,208
29.273585
72
cc
null
ceph-main/src/test/librados/snapshots.cc
#include "include/rados.h" #include "test/librados/test.h" #include "test/librados/TestCase.h" #include "crimson_utils.h" #include <algorithm> #include <errno.h> #include "gtest/gtest.h" #include <string> using std::string; typedef RadosTest LibRadosSnapshots; typedef RadosTest LibRadosSnapshotsSelfManaged; typedef ...
14,249
38.915966
80
cc
null
ceph-main/src/test/librados/snapshots_cxx.cc
#include <algorithm> #include <errno.h> #include <string> #include "gtest/gtest.h" #include "include/rados.h" #include "include/rados/librados.hpp" #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" #include "crimson_utils.h" using namespace librados; typedef RadosTestPP LibRadosSnapshotsPP...
29,252
35.982301
91
cc
null
ceph-main/src/test/librados/snapshots_stats.cc
#include "include/rados.h" #include "json_spirit/json_spirit.h" #include "test/librados/test.h" #include "test/librados/TestCase.h" #include <algorithm> #include <errno.h> #include "gtest/gtest.h" #include <string> #include <vector> using std::string; class LibRadosSnapshotStatsSelfManaged : public RadosTest { publi...
11,177
32.567568
95
cc
null
ceph-main/src/test/librados/snapshots_stats_cxx.cc
#include <algorithm> #include <errno.h> #include <string> #include <vector> #include "gtest/gtest.h" #include "include/rados.h" #include "include/rados/librados.hpp" #include "json_spirit/json_spirit.h" #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" using namespace librados; using std::...
10,251
30.544615
92
cc
null
ceph-main/src/test/librados/stat.cc
#include "include/rados/librados.h" #include "test/librados/test.h" #include "test/librados/TestCase.h" #include "common/ceph_time.h" #include <algorithm> #include <errno.h> #include "gtest/gtest.h" #include "crimson_utils.h" typedef RadosTest LibRadosStat; typedef RadosTestEC LibRadosStatEC; TEST_F(LibRadosStat, S...
4,992
31.422078
92
cc
null
ceph-main/src/test/librados/stat_cxx.cc
#include "gtest/gtest.h" #include "include/rados/librados.hpp" #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" #include "crimson_utils.h" using namespace librados; typedef RadosTestPP LibRadosStatPP; typedef RadosTestECPP LibRadosStatECPP; TEST_F(LibRadosStatPP, StatPP) { char buf[128...
4,718
26.923077
63
cc
null
ceph-main/src/test/librados/test.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -* // vim: ts=8 sw=2 smarttab #include "include/rados/librados.h" #include "include/rados/librados.hpp" #include "test/librados/test.h" #include "include/stringify.h" #include "common/ceph_context.h" #include "common/config.h" #include <errno.h> #inc...
5,555
26.919598
189
cc
null
ceph-main/src/test/librados/test.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) 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 ...
988
28.969697
79
h
null
ceph-main/src/test/librados/test_common.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "common/Formatter.h" #include "include/stringify.h" #include "json_spirit/json_spirit.h" #include "test_common.h" using namespace std; namespace { using namespace ceph; int wait_for_healthy(rados_t *cluster) ...
4,246
24.279762
76
cc
null
ceph-main/src/test/librados/test_common.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -* // vim: ts=8 sw=2 smarttab #include "include/rados/librados.h" std::string set_pg_num( rados_t *cluster, const std::string &pool_name, uint32_t pg_num); std::string set_pgp_num( rados_t *cluster, const std::string &pool_name, uint32_t pgp_n...
325
31.6
70
h
null
ceph-main/src/test/librados/test_cxx.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -* // vim: ts=8 sw=2 smarttab #include "test_cxx.h" #include "include/stringify.h" #include "common/ceph_context.h" #include "common/config.h" #include <errno.h> #include <sstream> #include <stdlib.h> #include <string> #include <time.h> #include <uni...
5,801
27.441176
189
cc
null
ceph-main/src/test/librados/test_cxx.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "include/rados/librados.hpp" #include "test/librados/test_shared.h" std::string create_one_pool_pp(const std::string &pool_name, librados::Rados &cluster); std::string create_one_pool_pp(cons...
882
43.15
83
h
null
ceph-main/src/test/librados/test_shared.cc
#include "test_shared.h" #include <cstring> #include "gtest/gtest.h" #include "include/buffer.h" using namespace ceph; std::string get_temp_pool_name(const std::string &prefix) { char hostname[80]; char out[160]; memset(hostname, 0, sizeof(hostname)); memset(out, 0, sizeof(out)); gethostname(hostname, size...
1,097
23.4
66
cc