#!/bin/sh
usage() {
- local prog_name=$1
+ prog_name=$1
shift
cat <<EOF
usage:
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-dir directory of cbt if you have already a copy of it. ceph/cbt:master will be cloned from github if not specified
+ --cbt directory of cbt if you have already a copy of it. ceph/cbt:master will be cloned from github if not specified
-h,--help print this help message
--source-dir the path to the top level of Ceph source tree, default to $PWD/..
--use-existing do not setup/teardown a vstart cluster for testing
# store absolute path before changing cwd
source_dir=$(readlink -f $source_dir)
if ! $use_existing; then
- cd $build_dir
+ cd $build_dir || exit
# seastar uses 128*8 aio in reactor for io and 10003 aio for events pooling
# for each core, if it fails to enough aio context, the seastar application
# bails out. and take other process into consideration, let's make it
# 32768 per core
- max_io=$(expr 32768 \* $(nproc))
- if test $(/sbin/sysctl --values fs.aio-max-nr) -lt $max_io; then
+ max_io=$(expr 32768 \* "$(nproc)")
+ if test "$(/sbin/sysctl --values fs.aio-max-nr)" -lt $max_io; then
sudo /sbin/sysctl -q -w fs.aio-max-nr=$max_io
fi
if $classical; then
MDS=0 MGR=1 OSD=3 MON=1 $source_dir/src/vstart.sh -n -X \
- --without-dashboard --memstore \
- -o "memstore_device_bytes=34359738368"
+ --without-dashboard
else
MDS=0 MGR=1 OSD=3 MON=1 $source_dir/src/vstart.sh -n -X \
--without-dashboard --memstore \
--crimson --nodaemon --redirect-output \
--osd-args "--memory 4G"
fi
- cd -
+ cd - || exit
fi
for config_file in $config_files; do
done
if ! $use_existing; then
- cd $build_dir
+ cd $build_dir || exit
if $classical; then
$source_dir/src/stop.sh
else