diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/test/test_rw.sh | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test_rw.sh')
-rwxr-xr-x | src/test/test_rw.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/test/test_rw.sh b/src/test/test_rw.sh new file mode 100755 index 000000000..cb7dc7767 --- /dev/null +++ b/src/test/test_rw.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +set -x + +# +# Generic read/write from object store test +# + +# Includes +source "`dirname $0`/test_common.sh" + +TEST_POOL=rbd + +# Functions +my_write_objects() { + write_objects $1 $2 10 1000000 $TEST_POOL +} + +setup() { + export CEPH_NUM_OSD=$1 + + # Start ceph + ./stop.sh + + ./vstart.sh -d -n || die "vstart.sh failed" +} + +read_write_1_impl() { + write_objects 1 2 100 8192 $TEST_POOL + read_objects 2 100 8192 + + write_objects 3 3 10 81920 $TEST_POOL + read_objects 3 10 81920 + + write_objects 4 4 100 4 $TEST_POOL + read_objects 4 100 4 + + write_objects 1 2 100 8192 $TEST_POOL + read_objects 2 100 8192 + + # success + return 0 +} + +read_write_1() { + setup 3 + read_write_1_impl +} + +run() { + read_write_1 || die "test failed" +} + +$@ |