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/script/kcon_most.sh
#!/bin/sh -x p() { echo "$*" > /sys/kernel/debug/dynamic_debug/control } echo 9 > /proc/sysrq-trigger p 'module ceph +p' p 'module libceph +p' p 'module rbd +p' p 'file net/ceph/messenger.c -p' p 'file' `grep -- --- /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '+p' p 'f...
435
30.142857
118
sh
null
ceph-main/src/script/lib-build.sh
#!/usr/bin/env bash # # lib-build.sh - A library of build and test bash shell functions. # # There should be few, or none, globals in this file beyond function # definitions. # # This script should be `shellcheck`ed. Please run shellcheck when # making changes to this script and use ignore comments # (ref: https://www....
3,031
33.067416
79
sh
null
ceph-main/src/script/run-cbt.sh
#!/bin/sh usage() { prog_name=$1 shift cat <<EOF usage: $prog_name [options] <config-file>... options: -a,--archive-dir directory in which the test result is stored, default to $PWD/cbt-archive --build-dir directory where CMakeCache.txt is located, default to $PWD --cbt di...
4,207
27.241611
141
sh
null
ceph-main/src/script/run-make.sh
#!/usr/bin/env bash set -e if ! [ "${_SOURCED_LIB_BUILD}" = 1 ]; then SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" CEPH_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" . "${CEPH_ROOT}/src/script/lib-build.sh" || exit 2 fi trap clean_up_after_myself EXIT ORIGINAL_CCACHE_CONF="$HOME/.ccache/ccach...
5,447
29.099448
88
sh
null
ceph-main/src/script/run_mypy.sh
#!/usr/bin/env bash # needs to be executed from the src directory. # generates a report at src/mypy_report.txt set -e python3 -m venv .mypy_venv . .mypy_venv/bin/activate ! pip install $(find -name requirements.txt -not -path './frontend/*' -printf '-r%p ') pip install mypy MYPY_INI="$PWD"/mypy.ini export MYPYPA...
2,880
25.431193
188
sh
null
ceph-main/src/script/run_tox.sh
#!/usr/bin/env bash set -e if [ `uname` = FreeBSD ]; then GETOPT=/usr/local/bin/getopt else GETOPT=getopt fi function usage() { local prog_name=$(basename $1) shift cat <<EOF $prog_name [options] ... [test_name] options: [-h|--help] display this help message [--source-dir dir] root...
3,696
27.007576
251
sh
null
ceph-main/src/script/run_uml.sh
#!/bin/bash -norc # Magic startup script for a UML instance. As long as unique # instances are started, more than one of them can be concurrently # in use on a single system. All their network interfaces are # bridged together onto the virtual bridge "virbr0" which is # supplied by the "libvirt" package. # # Note th...
6,622
30.093897
68
sh
null
ceph-main/src/script/set_up_stretch_mode.sh
#!/usr/bin/env bash set -x ./bin/ceph config set osd osd_crush_update_on_start false ./bin/ceph osd crush move osd.0 host=host1-1 datacenter=site1 root=default ./bin/ceph osd crush move osd.1 host=host1-2 datacenter=site1 root=default ./bin/ceph osd crush move osd.2 host=host2-1 datacenter=site2 root=default ./bin/c...
1,613
28.345455
74
sh
null
ceph-main/src/script/strip_trailing_whitespace.sh
#!/bin/sh sed -i 's/[ \t]*$//' $1 sed -i 's/^ /\t/' $1
63
11.8
27
sh
null
ceph-main/src/script/kubejacker/kubejacker.sh
#!/bin/bash set -x set -e SCRIPT=$(readlink -f "$0") SCRIPTPATH=$(dirname "$SCRIPT") # Run me from your build dir! I look for binaries in bin/, lib/ etc. BUILDPATH=$(pwd) # PREREQUISITE: a repo that you can push to. You are probably running # a local docker registry that your kubelet nodes also have access to. RE...
2,665
28.955056
128
sh
null
ceph-main/src/script/smr_benchmark/linearCopy.sh
#!/usr/bin/env bash # copy a linear file from srcFile to destination disk in a loop until writeSize MBs is written # destinationDisk is a SMR Host Aware Disk eg. /dev/sdb if [ "$#" -lt 3 ]; then echo "Usage ./linearCopy.sh srcFile destinationDisk writeSize(MB)" exit fi if [ "$(id -u)" != "0" ]; then echo "Please ...
1,898
19.641304
94
sh
null
ceph-main/src/script/smr_benchmark/linearSMRCopy.sh
#! /usr/bin/env bash # copy a linear file from srcFile to destination SMRDisk in a loop until writeSize MBs is written # SMRDisk is the SMR Host Aware / Host Managed Disk eg. /dev/sdb usage(){ echo "linearSMRCopy.sh <srcFile> <SMRDisk> <writeSize (MB)>" } if [ "$#" -lt 3 ]; then usage exit fi if [ "$(id -u)" != ...
1,789
24.571429
127
sh
null
ceph-main/src/test/TestSignalHandlers.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) 2010 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version ...
2,911
23.677966
82
cc
null
ceph-main/src/test/TestTimers.cc
#include "common/ceph_argparse.h" #include "common/ceph_mutex.h" #include "common/Timer.h" #include "global/global_init.h" #include "include/Context.h" #include <iostream> /* * TestTimers * * Tests the timer classes */ #define MAX_TEST_CONTEXTS 5 using namespace std; class TestContext; namespace { int test_a...
6,307
21.368794
75
cc
null
ceph-main/src/test/admin_socket.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 ...
10,771
30.497076
119
cc
null
ceph-main/src/test/admin_socket_output.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 * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
7,700
30.691358
90
cc
null
ceph-main/src/test/admin_socket_output.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) 2017 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,157
27.025974
86
h
null
ceph-main/src/test/admin_socket_output_tests.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 * * 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,504
31.453704
92
cc
null
ceph-main/src/test/admin_socket_output_tests.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) 2017 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....
744
24.689655
74
h
null
ceph-main/src/test/barclass.cc
#include <iostream> #include <string.h> #include <stdlib.h> #include "objclass/objclass.h" CLS_VER(1,0) CLS_NAME(bar) 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; cls_log("hello world, t...
817
15.693878
67
cc
null
ceph-main/src/test/base64.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 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version ...
2,671
24.941748
94
cc
null
ceph-main/src/test/bench_journald_logger.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "common/Journald.h" #include "log/Entry.h" #include "log/SubsystemMap.h" using namespace ceph::logging; int main() { SubsystemMap subs; JournaldLogger journald(&subs); for (int i = 0; i < 100000; i++) { ...
535
24.52381
147
cc
null
ceph-main/src/test/bench_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 "common/Thread.h" #include "common/debug.h" #include "common/Clock.h" #include "common/config.h" #include "common/ceph_argparse.h" #include "global/global_init.h" #define dout_context ...
1,880
20.62069
77
cc
null
ceph-main/src/test/bufferlist.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...
80,980
25.258431
98
cc
null
ceph-main/src/test/buildtest_skeleton.cc
#include "common/common_init.h" /* This program exists to test that we can build libcommon without * referencing g_ceph_context * * This program will go away as soon as we actually don't use g_ceph_context in * more programs. Obviously, at that point, those programs will provide an * equivalent test. */ int main...
360
24.785714
79
cc
null
ceph-main/src/test/ceph_argparse.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 ...
15,254
26.990826
93
cc
null
ceph-main/src/test/ceph_compatset.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,161
29.72619
84
cc
null
ceph-main/src/test/ceph_crypto.cc
#include "gtest/gtest.h" #include "common/ceph_argparse.h" #include "common/ceph_crypto.h" #include "common/common_init.h" #include "global/global_init.h" #include "global/global_context.h" class CryptoEnvironment: public ::testing::Environment { public: void SetUp() override { ceph::crypto::init(); } }; TEST...
9,505
32.121951
163
cc
null
ceph-main/src/test/confutils.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 ...
12,434
26.091503
76
cc
null
ceph-main/src/test/coverage.sh
#!/bin/sh set -e usage () { printf '%s: usage: %s [-d srcdir] [-o output_basename] COMMAND [ARGS..]\n' "$(basename "$0")" "$(basename "$0")" 1>&2 exit 1 } OUTPUT_BASENAME=coverage SRCDIR=. while getopts "d:o:h" flag do case $flag in d) SRCDIR=$OPTARG;; o) OUTPUT_BASENAME=$OPTARG;; *) usa...
900
29.033333
123
sh
null
ceph-main/src/test/crypto.cc
#include <errno.h> #include <time.h> #include <boost/container/small_vector.hpp> #include "gtest/gtest.h" #include "include/types.h" #include "auth/Crypto.h" #include "common/Clock.h" #include "common/ceph_crypto.h" #include "common/ceph_context.h" #include "global/global_context.h" using namespace std; class Crypt...
9,684
27.236152
77
cc
null
ceph-main/src/test/crypto_init.cc
#include <errno.h> #include <time.h> #include <pthread.h> #include <unistd.h> #include <vector> #include "include/types.h" #include "common/code_environment.h" #include "global/global_context.h" #include "global/global_init.h" #include "include/msgr.h" #include "gtest/gtest.h" #include "auth/Crypto.h" #include "common...
471
20.454545
41
cc
null
ceph-main/src/test/cxx11_client.cc
#include "include/buffer.h" // We might want to include here all our public headers. // Not any file residing in src/include has this status. int main() {}
158
21.714286
56
cc
null
ceph-main/src/test/daemon_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 ...
12,034
30.587927
110
cc
null
ceph-main/src/test/detect-build-env-vars.sh
#!/usr/bin/env bash if [ -n "$CEPH_BUILD_DIR" ] && [ -n "$CEPH_ROOT" ] && [ -n "$CEPH_BIN" ] && [ -n "$CEPH_LIB" ]; then echo "Enivronment Variables Already Set" elif [ -e CMakeCache.txt ]; then echo "Environment Variables Not All Set, Detected Build System CMake" echo "Setting Environment Variables" export CE...
639
31
100
sh
null
ceph-main/src/test/docker-test-helper.sh
#!/usr/bin/env bash # # Copyright (C) 2014, 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 by # the Free Software Foundation; either version 2, or (...
10,592
28.839437
141
sh
null
ceph-main/src/test/docker-test.sh
#!/usr/bin/env bash # # Copyright (C) 2014 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 by # the Free Software Foundation; either version 2, or (at you...
649
31.5
70
sh
null
ceph-main/src/test/encoding.cc
#include "include/buffer.h" #include "include/encoding.h" #include <fmt/format.h> #include "gtest/gtest.h" using namespace std; template < typename T > static void test_encode_and_decode(const T& src) { bufferlist bl(1000000); encode(src, bl); T dst; auto i = bl.cbegin(); decode(dst, i); ASSERT_EQ(src, d...
13,939
24.625
102
cc
null
ceph-main/src/test/escape.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 ...
4,786
36.108527
101
cc
null
ceph-main/src/test/fooclass.cc
#include <iostream> #include <string.h> #include <stdlib.h> #include "objclass/objclass.h" CLS_VER(1,0) CLS_NAME(foo) 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; cls_log("hello world, t...
817
15.693878
67
cc
null
ceph-main/src/test/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) 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 ...
9,231
25.005634
88
cc
null
ceph-main/src/test/gather.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 Greg Farnum <gregory.farnum@dreamhost.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser ...
2,887
26.769231
81
cc
null
ceph-main/src/test/heartbeat_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) 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,172
25.066667
71
cc
null
ceph-main/src/test/kv_store_bench.cc
/* * KvStoreBench.cc * * Created on: Aug 23, 2012 * Author: eleanor */ #include "test/kv_store_bench.h" #include "key_value_store/key_value_structure.h" #include "key_value_store/kv_flat_btree_async.h" #include "include/rados/librados.hpp" #include "test/omap_bench.h" #include "common/ceph_argparse.h" #in...
16,597
28.376991
123
cc
null
ceph-main/src/test/kv_store_bench.h
/* * Benchmarking suite for key-value store * * September 2, 2012 * Eleanor Cawthon * eleanor.cawthon@inktank.com * * 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 f...
5,252
26.217617
94
h
null
ceph-main/src/test/libcephfs_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 ...
1,645
24.323077
70
cc
null
ceph-main/src/test/librgw_file.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, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
7,245
23.815068
99
cc
null
ceph-main/src/test/librgw_file_aw.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, 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,902
23.949657
79
cc
null
ceph-main/src/test/librgw_file_cd.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, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
4,764
22.706468
79
cc
null
ceph-main/src/test/librgw_file_gp.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, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
13,117
24.226923
80
cc
null
ceph-main/src/test/librgw_file_marker.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, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
12,713
24.633065
78
cc
null
ceph-main/src/test/librgw_file_nfsns.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, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
32,378
25.649383
78
cc
null
ceph-main/src/test/librgw_file_xattr.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, 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,598
23.421659
79
cc
null
ceph-main/src/test/mime.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 ...
4,248
27.139073
70
cc
null
ceph-main/src/test/multi_stress_watch.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #include "include/rados/librados.h" #include "include/rados/librados.hpp" #include "test/librados/test_cxx.h" #include <errno.h> #include <mutex> #include <condition_variable> #include <chrono> #include <map> #include <iostream> #include <string>...
4,493
25.435294
173
cc
null
ceph-main/src/test/objectstore_bench.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <chrono> #include <cassert> #include <condition_variable> #include <memory> #include <mutex> #include <thread> #include "os/ObjectStore.h" #include "global/global_init.h" #include "common/strtol.h" #include "c...
9,291
27.157576
103
cc
null
ceph-main/src/test/omap_bench.cc
/* * Generate latency statistics for a configurable number of write * operations of configurable size. * * Created on: May 21, 2012 * Author: Eleanor Cawthon * * 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 pu...
12,407
27.722222
80
cc
null
ceph-main/src/test/omap_bench.h
/* * Generate latency statistics for a configurable number of object map write * operations of configurable size. * * Created on: May 21, 2012 * Author: Eleanor Cawthon * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version...
5,375
24.971014
78
h
null
ceph-main/src/test/on_exit.cc
#include <sys/mman.h> #include <sys/types.h> #include <sys/wait.h> #include <stdlib.h> #include <unistd.h> #include "include/on_exit.h" #include "include/ceph_assert.h" #ifndef MAP_ANONYMOUS # ifdef MAP_ANON # define MAP_ANONYMOUS MAP_ANON # else // cppcheck-suppress preprocessorErrorDirective # error "Don't know ho...
2,748
22.698276
74
cc
null
ceph-main/src/test/perf_counters.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 ...
23,801
33.34632
502
cc
null
ceph-main/src/test/perf_helper.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* Copyright (c) 2011 Facebook * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission n...
1,477
26.886792
77
cc
null
ceph-main/src/test/perf_helper.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* Copyright (c) 2011 Facebook * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission n...
1,098
34.451613
77
h
null
ceph-main/src/test/perf_local.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* Copyright (c) 2015 Haomai Wang <haomaiwang@gmail.com> * Copyright (c) 2011-2014 Stanford University * Copyright (c) 2011 Facebook * * Permission to use, copy, modify, and distribute this software for any * purpose ...
29,610
26.725655
92
cc
null
ceph-main/src/test/rbd-ggate.sh
#!/usr/bin/env bash # # Copyright (C) 2014, 2015 Red Hat <contact@redhat.com> # Copyright (C) 2013 Cloudwatt <libre.licensing@cloudwatt.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 publ...
901
33.692308
78
sh
null
ceph-main/src/test/run-rbd-unit-tests.sh
#!/usr/bin/env bash set -ex # this should be run from the src directory in the ceph.git source $(dirname $0)/detect-build-env-vars.sh PATH="$CEPH_BIN:$PATH" if [ $# = 0 ]; then # mimic the old behaviour TESTS='0 1 61 109 127' unset RBD_FEATURES; unittest_librbd elif [ $# = 1 -a "${1}" = N ] ; then # new styl...
473
17.230769
59
sh
null
ceph-main/src/test/run-rbd-valgrind-unit-tests.sh
#!/usr/bin/env bash set -ex # this should be run from the src directory in the ceph.git (when built with # automake) or cmake build directory source $(dirname $0)/detect-build-env-vars.sh RBD_FEATURES=13 valgrind --tool=memcheck --leak-check=full --error-exitcode=1 \ --suppressions=${CEPH_ROOT}/qa/valgrind.supp...
346
25.692308
79
sh
null
ceph-main/src/test/run_cmd.cc
#include "common/config.h" #include "common/run_cmd.h" #include "gtest/gtest.h" #include <stdlib.h> #include <unistd.h> TEST(RunCommand, StringSimple) { char temp_file_name[] = "run_cmd_temp_file_XXXXXX"; int fd = ::mkstemp(temp_file_name); ASSERT_GE(fd, 0); ::close(fd); std::string ret = run_cmd("touch"...
551
19.444444
66
cc
null
ceph-main/src/test/signals.cc
#include "common/config.h" #include "common/signal.h" #include "global/signal_handler.h" #include "common/debug.h" #include "include/coredumpctl.h" #include "gtest/gtest.h" #include <errno.h> #include <signal.h> #include <stdlib.h> #include <unistd.h> #include "include/ceph_assert.h" #define dout_context g_ceph_con...
3,064
18.27673
56
cc
null
ceph-main/src/test/simple_spin.cc
#include <future> #include "gtest/gtest.h" #include "include/spinlock.h" using ceph::spin_lock; using ceph::spin_unlock; static std::atomic_flag lock = ATOMIC_FLAG_INIT; static int64_t counter = 0; TEST(SimpleSpin, Test0) { std::atomic_flag lock0 = ATOMIC_FLAG_INIT; spin_lock(&lock0); spin_unlock(&lock0); }...
2,783
19.470588
77
cc
null
ceph-main/src/test/smoke.sh
#!/usr/bin/env bash source $CEPH_ROOT/qa/standalone/ceph-helpers.sh mon_port=$(get_unused_port) function run() { local dir=$1 shift export CEPH_MON="127.0.0.1:$mon_port" export CEPH_ARGS CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none " CEPH_ARGS+="--mon-host=$CEPH_MON " set -e ...
1,310
19.169231
74
sh
null
ceph-main/src/test/strtol.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 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version ...
14,177
20.812308
82
cc
null
ceph-main/src/test/test_addrs.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...
9,731
28.050746
107
cc
null
ceph-main/src/test/test_admin_socket_output.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 * * 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,766
27.976923
112
cc
null
ceph-main/src/test/test_any.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 Adam C. Emerson <aemerson@redhat.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU General Publi...
21,692
25.682657
77
cc
null
ceph-main/src/test/test_arch.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) 2014 Red Hat <contact@redhat.com> * * Author: Loic Dachary <loic@dachary.org> * * This library is free software; you can redistribute it and/or * modify it u...
2,353
24.042553
101
cc
null
ceph-main/src/test/test_auth.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 "auth/Auth.h" #include "gtest/gtest.h" #include "common/ceph_context.h" #include "global/global_context.h" #include "auth/AuthRegistry.h" #include <sstre...
10,284
40.471774
80
cc
null
ceph-main/src/test/test_backfill.sh
#!/bin/sh TEST_POOL=rbd ./stop.sh CEPH_NUM_OSD=3 ./vstart.sh -d -n -x -o 'osd min pg log entries = 5' ./rados -p $TEST_POOL bench 15 write -b 4096 ./ceph osd out 0 ./init-ceph stop osd.0 ./ceph osd down 0 ./rados -p $TEST_POOL bench 600 write -b 4096
255
20.333333
67
sh
null
ceph-main/src/test/test_c2c.cc
#include "common/ceph_argparse.h" #include "common/debug.h" #include "common/config.h" #include "global/global_init.h" #include "global/signal_handler.h" #include "include/mempool.h" #include <iostream> #include <string> using std::cerr; using std::string; static void usage(void) { cerr << "--threads number...
1,927
20.662921
94
cc
null
ceph-main/src/test/test_cfuse_cache_invalidate.cc
#include <stdio.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <sys/wait.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "include/ceph_assert.h" #define REGION 1048576 int main(int argc, char *argv[]) { pid_t p = fork(); char buf[REGION]; memset(buf, 0, size...
1,005
17.290909
56
cc
null
ceph-main/src/test/test_common.sh
#!/usr/bin/env bash set -x # # test_common.sh # # Common routines for tests # # # Environment variables that affect tests: # KEEP_TEMPDIR If set, the tempdir will not be deleted # when the test is over. # # Clean up the temporary directory cleanup() { if [ -n ${T...
4,371
23.982857
106
sh
null
ceph-main/src/test/test_cors.cc
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> extern "C"{ #include <curl/curl.h> } #include "common/ceph_crypto.h" #include <map> #include <list> #define S3_BUCKET_NAME "s3testgw.fcgi" #define SWIFT_BUCKET_NAME "swift3testgw.fcgi" #define BUCKET_URL \ ((g_test->get_key_type() == KEY_T...
34,226
36.945676
113
cc
null
ceph-main/src/test/test_crush_bucket.sh
#!/usr/bin/env bash #Generic test_crush_bucket test # # Includes source $(dirname $0)/detect-build-env-vars.sh source ../qa/standalone/ceph-helpers.sh function run() { local dir=$1 shift export CEPH_MON="127.0.0.1:17119" # git grep '\<17119\>' : there must be only one export CEPH_ARGS CEPH_ARGS...
1,516
27.622642
108
sh
null
ceph-main/src/test/test_csyn.sh
#!/usr/bin/env bash set -x # # Runs the synthetic client # # Includes source "`dirname $0`/test_common.sh" # Functions setup() { export CEPH_NUM_OSD=$1 # Start ceph ./stop.sh # set recovery start to a really long time to ensure that we don't start recovery ./vstart.sh -d -n ...
633
16.135135
98
sh
null
ceph-main/src/test/test_denc.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) 2016 Red Hat * * Author: Sage Weil <sage@redhat.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU...
16,370
21.004032
79
cc
null
ceph-main/src/test/test_features.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <stdio.h> #include "global/global_init.h" #include "common/ceph_argparse.h" #include "common/ceph_releases.h" #include "common/ceph_strings.h" #include "global/global_context.h" #include "gtest/gtest.h" #include ...
1,433
28.875
80
cc
null
ceph-main/src/test/test_get_blkdev_props.cc
#include <stdio.h> #include <errno.h> #include <string.h> #include <fcntl.h> #include <inttypes.h> #include <sys/types.h> #include <sys/stat.h> #include "include/uuid.h" #include "common/blkdev.h" #define BUFSIZE 80 int main(int argc, char **argv) { int fd, ret; int64_t size; bool discard_support; bool rotational...
2,018
21.433333
65
cc
null
ceph-main/src/test/test_intarith.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <climits> #include <gtest/gtest.h> #include "include/intarith.h" TEST(intarith, cbits) { ASSERT_EQ(0u, cbits(0)); ASSERT_EQ(1u, cbits(1)); ASSERT_EQ(2u, cbits(2)); ASSERT_EQ(2u, cbits(3)); ASSERT_EQ(3u...
1,128
26.536585
70
cc
null
ceph-main/src/test/test_ipaddr.cc
#include "include/ipaddr.h" #include "common/pick_address.h" #include "gtest/gtest.h" #include "include/stringify.h" #include "common/ceph_context.h" #include <boost/smart_ptr/intrusive_ptr.hpp> #if defined(__FreeBSD__) #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #endif #include <arpa/inet....
27,288
26.343687
109
cc
null
ceph-main/src/test/test_lost.sh
#!/usr/bin/env bash set -x # # Test the lost object logic # # Includes source "`dirname $0`/test_common.sh" TEST_POOL=rbd # Functions setup() { export CEPH_NUM_OSD=$1 vstart_config=$2 # Start ceph ./stop.sh # set recovery start to a really long time to ensure that we don't ...
6,419
23.883721
89
sh
null
ceph-main/src/test/test_mempool.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) 2016 Western Digital Corporation * * Author: Allen Samuels <allen.samuels@sandisk.com> * * This library is free software; you can redistribute it and/or * mo...
11,258
23.422993
101
cc
null
ceph-main/src/test/test_missing_unfound.sh
#!/bin/sh CEPH_NUM_OSD=3 ./vstart.sh -d -n -x -o 'osd recovery max active = 1' TEST_POOL=rbd ./ceph -c ./ceph.conf osd pool set $TEST_POOL size 3 sleep 20 ./init-ceph stop osd.1 ./ceph osd down 1 # faster for f in `seq 1 100` do ./rados -c ./ceph.conf -p $TEST_POOL put test_$f /etc/passwd done # zap some o...
512
16.1
68
sh
null
ceph-main/src/test/test_mutate.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,870
24.40708
81
cc
null
ceph-main/src/test/test_objectstore_memstore.sh
#!/bin/sh -ex rm -rf memstore.test_temp_dir ceph_test_objectstore --gtest_filter=\*/0 echo OK
96
12.857143
41
sh
null
ceph-main/src/test/test_pageset.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 "os/memstore/PageSet.h" template <typename T> bool is_aligned(T* ptr) { const auto align_mask = alignof(T) - 1; return (reinterpret_cast<uintptr_t>(ptr) & align_mask) == 0; } TEST(P...
6,808
22.975352
70
cc
null
ceph-main/src/test/test_pidfile.sh
#!/usr/bin/env bash # # test pidfile here # # Includes source $(dirname $0)/detect-build-env-vars.sh source $CEPH_ROOT/qa/standalone/ceph-helpers.sh function run() { local dir=$1 shift export CEPH_MON="127.0.0.1:7124" # git grep '\<7124\>' : there must be only one export CEPH_ARGS CEPH_ARGS+="-...
2,479
26.252747
91
sh
null
ceph-main/src/test/test_pools.sh
#!/usr/bin/env bash set -x # # Test pools # # Includes source "`dirname $0`/test_common.sh" # Functions setup() { export CEPH_NUM_OSD=$1 # Start ceph ./stop.sh ./vstart.sh -d -n || die "vstart failed" } test629_impl() { # create the pool ./ceph -c ./ceph.conf osd po...
898
16.627451
103
sh
null
ceph-main/src/test/test_rados_tool.sh
../../qa/workunits/rados/test_rados_tool.sh
43
43
43
sh
null
ceph-main/src/test/test_random_string.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....
3,587
28.652893
82
cc
null
ceph-main/src/test/test_rbd_replay.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...
4,039
28.489051
87
cc
null
ceph-main/src/test/test_rewrite_latency.cc
#include <unistd.h> #include <map> #include <errno.h> #include "include/utime.h" #include "common/Clock.h" #include "common/errno.h" using namespace std; int main(int argc, const char **argv) { const char *fn = argv[1]; multimap<utime_t, utime_t> latency; unsigned max = 10; int fd = ::open(fn, O_CREAT|O_RD...
1,144
22.854167
82
cc