diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /qa/workunits/suites | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/workunits/suites')
-rwxr-xr-x | qa/workunits/suites/blogbench.sh | 15 | ||||
-rwxr-xr-x | qa/workunits/suites/bonnie.sh | 11 | ||||
-rwxr-xr-x | qa/workunits/suites/cephfs_journal_tool_smoke.sh | 92 | ||||
-rwxr-xr-x | qa/workunits/suites/dbench-short.sh | 5 | ||||
-rwxr-xr-x | qa/workunits/suites/dbench.sh | 6 | ||||
-rwxr-xr-x | qa/workunits/suites/ffsb.sh | 31 | ||||
-rwxr-xr-x | qa/workunits/suites/fio.sh | 42 | ||||
-rwxr-xr-x | qa/workunits/suites/fsstress.sh | 17 | ||||
-rwxr-xr-x | qa/workunits/suites/fsx.sh | 16 | ||||
-rwxr-xr-x | qa/workunits/suites/fsync-tester.sh | 13 | ||||
-rwxr-xr-x | qa/workunits/suites/iogen.sh | 17 | ||||
-rwxr-xr-x | qa/workunits/suites/iozone-sync.sh | 22 | ||||
-rwxr-xr-x | qa/workunits/suites/iozone.sh | 7 | ||||
-rwxr-xr-x | qa/workunits/suites/pjd.sh | 17 | ||||
-rw-r--r-- | qa/workunits/suites/random_write.32.ffsb | 48 |
15 files changed, 359 insertions, 0 deletions
diff --git a/qa/workunits/suites/blogbench.sh b/qa/workunits/suites/blogbench.sh new file mode 100755 index 000000000..a05d8d21c --- /dev/null +++ b/qa/workunits/suites/blogbench.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -e + +echo "getting blogbench" +wget http://download.ceph.com/qa/blogbench-1.0.tar.bz2 +#cp /home/gregf/src/blogbench-1.0.tar.bz2 . +tar -xvf blogbench-1.0.tar.bz2 +cd blogbench-1.0/ +echo "making blogbench" +./configure +make +cd src +mkdir blogtest_in +echo "running blogbench" +./blogbench -d blogtest_in diff --git a/qa/workunits/suites/bonnie.sh b/qa/workunits/suites/bonnie.sh new file mode 100755 index 000000000..b60cc6a5e --- /dev/null +++ b/qa/workunits/suites/bonnie.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e + +bonnie_bin=`which bonnie++` +[ $? -eq 1 ] && bonnie_bin=/usr/sbin/bonnie++ + +uid_flags="" +[ "`id -u`" == "0" ] && uid_flags="-u root" + +$bonnie_bin $uid_flags -n 100 diff --git a/qa/workunits/suites/cephfs_journal_tool_smoke.sh b/qa/workunits/suites/cephfs_journal_tool_smoke.sh new file mode 100755 index 000000000..3fe01ed63 --- /dev/null +++ b/qa/workunits/suites/cephfs_journal_tool_smoke.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash + +set -e +set -x + +export BIN="${BIN:-cephfs-journal-tool --rank=cephfs:0}" +export JOURNAL_FILE=/tmp/journal.bin +export JSON_OUTPUT=/tmp/json.tmp +export BINARY_OUTPUT=/tmp/binary.tmp + +if [ -d $BINARY_OUTPUT ] ; then + rm -rf $BINARY_OUTPUT +fi + +# Check that the import/export stuff really works as expected +# first because it's used as the reset method between +# following checks. +echo "Testing that export/import cycle preserves state" +HEADER_STATE=`$BIN header get` +EVENT_LIST=`$BIN event get list` +$BIN journal export $JOURNAL_FILE +$BIN journal import $JOURNAL_FILE +NEW_HEADER_STATE=`$BIN header get` +NEW_EVENT_LIST=`$BIN event get list` + +if [ ! "$HEADER_STATE" = "$NEW_HEADER_STATE" ] ; then + echo "Import failed to preserve header state" + echo $HEADER_STATE + echo $NEW_HEADER_STATE + exit -1 +fi + +if [ ! "$EVENT_LIST" = "$NEW_EVENT_LIST" ] ; then + echo "Import failed to preserve event state" + echo $EVENT_LIST + echo $NEW_EVENT_LIST + exit -1 +fi + +echo "Testing 'journal' commands..." + +# Simplest thing: print the vital statistics of the journal +$BIN journal inspect +$BIN header get + +# Make a copy of the journal in its original state +$BIN journal export $JOURNAL_FILE +if [ ! -s $JOURNAL_FILE ] ; then + echo "Export to $JOURNAL_FILE failed" + exit -1 +fi + +# Can we execute a journal reset? +$BIN journal reset +$BIN journal inspect +$BIN header get + +echo "Rolling back journal to original state..." +$BIN journal import $JOURNAL_FILE + +echo "Testing 'header' commands..." +$BIN header get +$BIN header set write_pos 123 +$BIN header set expire_pos 123 +$BIN header set trimmed_pos 123 + +echo "Rolling back journal to original state..." +$BIN journal import $JOURNAL_FILE + +echo "Testing 'event' commands..." +$BIN event get summary +$BIN event get --type=UPDATE --path=/ --inode=0 --frag=0x100 summary +$BIN event get json --path $JSON_OUTPUT +if [ ! -s $JSON_OUTPUT ] ; then + echo "Export to $JSON_OUTPUT failed" + exit -1 +fi +$BIN event get binary --path $BINARY_OUTPUT +if [ ! -s $BINARY_OUTPUT ] ; then + echo "Export to $BINARY_OUTPUT failed" + exit -1 +fi +$BIN event recover_dentries summary +$BIN event splice summary + +# Tests finish. +# Metadata objects have been modified by the 'event recover_dentries' command. +# Journal is no long consistent with respect to metadata objects (especially inotable). +# To ensure mds successfully replays its journal, we need to do journal reset. +$BIN journal reset +cephfs-table-tool all reset session + diff --git a/qa/workunits/suites/dbench-short.sh b/qa/workunits/suites/dbench-short.sh new file mode 100755 index 000000000..b0da02275 --- /dev/null +++ b/qa/workunits/suites/dbench-short.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +dbench 1 diff --git a/qa/workunits/suites/dbench.sh b/qa/workunits/suites/dbench.sh new file mode 100755 index 000000000..32c893b45 --- /dev/null +++ b/qa/workunits/suites/dbench.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e + +dbench 1 +dbench 10 diff --git a/qa/workunits/suites/ffsb.sh b/qa/workunits/suites/ffsb.sh new file mode 100755 index 000000000..bf95a05c4 --- /dev/null +++ b/qa/workunits/suites/ffsb.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -e + +mydir=`dirname $0` + +# try it again if the clone is slow and the second time +trap -- 'retry' EXIT +retry() { + rm -rf ffsb + # double the timeout value + timeout 3600 git clone https://git.ceph.com/ffsb.git --depth 1 +} +rm -rf ffsb +timeout 1800 git clone https://git.ceph.com/ffsb.git --depth 1 +trap - EXIT + +cd ffsb +./configure +make +cd .. +mkdir tmp +cd tmp + +for f in $mydir/*.ffsb +do + ../ffsb/ffsb $f +done +cd .. +rm -r tmp ffsb* + diff --git a/qa/workunits/suites/fio.sh b/qa/workunits/suites/fio.sh new file mode 100755 index 000000000..ee69de81c --- /dev/null +++ b/qa/workunits/suites/fio.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +set -x + +gen_fio_file() { + iter=$1 + f=$2 + cat > randio-$$-${iter}.fio <<EOF +[randio] +blocksize_range=32m:128m +blocksize_unaligned=1 +filesize=10G:20G +readwrite=randrw +runtime=300 +size=20G +filename=${f} +EOF +} + +sudo apt-get -y install fio +for i in $(seq 1 20); do + fcount=$(ls donetestfile* 2>/dev/null | wc -l) + donef="foo" + fiof="bar" + if test ${fcount} -gt 0; then + # choose random file + r=$[ ${RANDOM} % ${fcount} ] + testfiles=( $(ls donetestfile*) ) + donef=${testfiles[${r}]} + fiof=$(echo ${donef} | sed -e "s|done|fio|") + gen_fio_file $i ${fiof} + else + fiof=fiotestfile.$$.$i + donef=donetestfile.$$.$i + gen_fio_file $i ${fiof} + fi + + sudo rm -f ${donef} + sudo fio randio-$$-$i.fio + sudo ln ${fiof} ${donef} + ls -la +done diff --git a/qa/workunits/suites/fsstress.sh b/qa/workunits/suites/fsstress.sh new file mode 100755 index 000000000..e5da5b439 --- /dev/null +++ b/qa/workunits/suites/fsstress.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -ex + +mkdir -p fsstress +pushd fsstress +wget -q -O ltp-full.tgz http://download.ceph.com/qa/ltp-full-20091231.tgz +tar xzf ltp-full.tgz +pushd ltp-full-20091231/testcases/kernel/fs/fsstress +make +BIN=$(readlink -f fsstress) +popd +popd + +T=$(mktemp -d -p .) +"$BIN" -d "$T" -l 1 -n 1000 -p 10 -v +rm -rf -- "$T" diff --git a/qa/workunits/suites/fsx.sh b/qa/workunits/suites/fsx.sh new file mode 100755 index 000000000..0d5ba3a58 --- /dev/null +++ b/qa/workunits/suites/fsx.sh @@ -0,0 +1,16 @@ +#!/bin/sh -x + +set -e + +git clone https://git.ceph.com/xfstests-dev.git +cd xfstests-dev +git checkout 12973fc04fd10d4af086901e10ffa8e48866b735 +make -j4 +cd .. +cp xfstests-dev/ltp/fsx . + +OPTIONS="-z" # don't use zero range calls; not supported by cephfs + +./fsx $OPTIONS 1MB -N 50000 -p 10000 -l 1048576 +./fsx $OPTIONS 10MB -N 50000 -p 10000 -l 10485760 +./fsx $OPTIONS 100MB -N 50000 -p 10000 -l 104857600 diff --git a/qa/workunits/suites/fsync-tester.sh b/qa/workunits/suites/fsync-tester.sh new file mode 100755 index 000000000..6e32786ea --- /dev/null +++ b/qa/workunits/suites/fsync-tester.sh @@ -0,0 +1,13 @@ +#!/bin/sh -x + +set -e + +# To skirt around GPL compatibility issues: +wget http://download.ceph.com/qa/fsync-tester.c +gcc -D_GNU_SOURCE fsync-tester.c -o fsync-tester + +./fsync-tester + +echo $PATH +whereis lsof +lsof diff --git a/qa/workunits/suites/iogen.sh b/qa/workunits/suites/iogen.sh new file mode 100755 index 000000000..d92b87083 --- /dev/null +++ b/qa/workunits/suites/iogen.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -e + +echo "getting iogen" +wget http://download.ceph.com/qa/iogen_3.1p0.tar +tar -xvzf iogen_3.1p0.tar +cd iogen_3.1p0 +echo "making iogen" +make +echo "running iogen" +./iogen -n 5 -s 2g +echo "sleep for 10 min" +sleep 600 +echo "stopping iogen" +./iogen -k + +echo "OK" diff --git a/qa/workunits/suites/iozone-sync.sh b/qa/workunits/suites/iozone-sync.sh new file mode 100755 index 000000000..a37962d30 --- /dev/null +++ b/qa/workunits/suites/iozone-sync.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -e + +# basic tests of O_SYNC, O_DSYNC, O_RSYNC +# test O_SYNC +iozone -c -e -s 512M -r 1M -t 1 -F osync1 -i 0 -i 1 -o +# test O_DSYNC +iozone -c -e -s 512M -r 1M -t 1 -F odsync1 -i 0 -i 1 -+D +# test O_RSYNC +iozone -c -e -s 512M -r 1M -t 1 -F orsync1 -i 0 -i 1 -+r + +# test same file with O_SYNC in one process, buffered in the other +# the sync test starts first, so the buffered test should blow +# past it and +iozone -c -e -s 512M -r 1M -t 1 -F osync2 -i 0 -i 1 -o & +sleep 1 +iozone -c -e -s 512M -r 256K -t 1 -F osync2 -i 0 +wait $! + +# test same file with O_SYNC from different threads +iozone -c -e -s 512M -r 1M -t 2 -F osync3 -i 2 -o diff --git a/qa/workunits/suites/iozone.sh b/qa/workunits/suites/iozone.sh new file mode 100755 index 000000000..7dc50cb0b --- /dev/null +++ b/qa/workunits/suites/iozone.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -ex + +iozone -c -e -s 1024M -r 16K -t 1 -F f1 -i 0 -i 1 +iozone -c -e -s 1024M -r 1M -t 1 -F f2 -i 0 -i 1 +iozone -c -e -s 10240M -r 1M -t 1 -F f3 -i 0 -i 1 diff --git a/qa/workunits/suites/pjd.sh b/qa/workunits/suites/pjd.sh new file mode 100755 index 000000000..bd72f77f2 --- /dev/null +++ b/qa/workunits/suites/pjd.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e + +wget http://download.ceph.com/qa/pjd-fstest-20090130-RC-aclfixes.tgz +tar zxvf pjd*.tgz +cd pjd-fstest-20090130-RC +make clean +make +cd .. +mkdir tmp +cd tmp +# must be root! +sudo prove -r -v --exec 'bash -x' ../pjd*/tests +cd .. +rm -rf tmp pjd* + diff --git a/qa/workunits/suites/random_write.32.ffsb b/qa/workunits/suites/random_write.32.ffsb new file mode 100644 index 000000000..ba83e470f --- /dev/null +++ b/qa/workunits/suites/random_write.32.ffsb @@ -0,0 +1,48 @@ +# Large file random writes. +# 1024 files, 100MB per file. + +time=300 # 5 min +alignio=1 + +[filesystem0] + location=. + num_files=128 + min_filesize=104857600 # 100 MB + max_filesize=104857600 + reuse=1 +[end0] + +[threadgroup0] + num_threads=32 + + write_random=1 + write_weight=1 + + write_size=5242880 # 5 MB + write_blocksize=4096 + + [stats] + enable_stats=1 + enable_range=1 + + msec_range 0.00 0.01 + msec_range 0.01 0.02 + msec_range 0.02 0.05 + msec_range 0.05 0.10 + msec_range 0.10 0.20 + msec_range 0.20 0.50 + msec_range 0.50 1.00 + msec_range 1.00 2.00 + msec_range 2.00 5.00 + msec_range 5.00 10.00 + msec_range 10.00 20.00 + msec_range 20.00 50.00 + msec_range 50.00 100.00 + msec_range 100.00 200.00 + msec_range 200.00 500.00 + msec_range 500.00 1000.00 + msec_range 1000.00 2000.00 + msec_range 2000.00 5000.00 + msec_range 5000.00 10000.00 + [end] +[end0] |