From: Patrick Donnelly Date: Thu, 11 May 2023 16:16:59 +0000 (-0400) Subject: qa: add option to set python executable X-Git-Tag: v19.0.0~989^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b6867bb25534c4e10287f5ac6c44fd9c1a5f96ef;p=ceph.git qa: add option to set python executable To support systems like mine with multiple python installs. Signed-off-by: Patrick Donnelly --- diff --git a/qa/workunits/fs/damage/test-first-damage.sh b/qa/workunits/fs/damage/test-first-damage.sh index 5cbae5f37fa..e13f1ef13e0 100755 --- a/qa/workunits/fs/damage/test-first-damage.sh +++ b/qa/workunits/fs/damage/test-first-damage.sh @@ -6,6 +6,7 @@ FIRST_DAMAGE="first-damage.py" FS=cephfs METADATA_POOL=cephfs_meta MOUNT=~/mnt/mnt.0 +PYTHON=python3 function usage { printf '%s: [--fs=] [--metadata-pool=] [--first-damage=]\n' @@ -83,9 +84,9 @@ function recover { sleep 5 cephfs-journal-tool --rank="$FS":0 event recover_dentries summary cephfs-journal-tool --rank="$FS":0 journal reset - python3 $FIRST_DAMAGE --debug /tmp/debug1 --memo /tmp/memo1 "$METADATA_POOL" - python3 $FIRST_DAMAGE --debug /tmp/debug2 --memo /tmp/memo2 --repair-nosnap "$METADATA_POOL" - python3 $FIRST_DAMAGE --debug /tmp/debug3 --memo /tmp/memo3 --remove "$METADATA_POOL" + "$PYTHON" $FIRST_DAMAGE --debug /tmp/debug1 --memo /tmp/memo1 "$METADATA_POOL" + "$PYTHON" $FIRST_DAMAGE --debug /tmp/debug2 --memo /tmp/memo2 --repair-nosnap "$METADATA_POOL" + "$PYTHON" $FIRST_DAMAGE --debug /tmp/debug3 --memo /tmp/memo3 --remove "$METADATA_POOL" ceph fs set "$FS" joinable true } @@ -123,7 +124,7 @@ function mount { } function main { - eval set -- $(getopt --name "$0" --options '' --longoptions 'help,fs:,metadata-pool:,first-damage:,mount:' -- "$@") + eval set -- $(getopt --name "$0" --options '' --longoptions 'help,fs:,metadata-pool:,first-damage:,mount:,python:' -- "$@") while [ "$#" -gt 0 ]; do echo "$*" @@ -148,6 +149,10 @@ function main { FIRST_DAMAGE="$2" shift 2 ;; + --python) + PYTHON="$2" + shift 2 + ;; --) shift break