]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/script/run-cbt.sh
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / script / run-cbt.sh
index 9205fee24f9bd957fd156f1094a5d89d0c333c4b..116cc77f22f0eb982f7b9b10c67d2f163a410f40 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 usage() {
-    local prog_name=$1
+    prog_name=$1
     shift
     cat <<EOF
 usage:
@@ -10,7 +10,7 @@ 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
@@ -86,19 +86,18 @@ fi
 # 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 \
@@ -106,7 +105,7 @@ if ! $use_existing; then
            --crimson --nodaemon --redirect-output \
            --osd-args "--memory 4G"
     fi
-    cd -
+    cd - || exit
 fi
 
 for config_file in $config_files; do
@@ -124,7 +123,7 @@ 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