]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/test_rw.sh
import ceph quincy 17.2.4
[ceph.git] / ceph / src / test / test_rw.sh
CommitLineData
11fdf7f2
TL
1#!/usr/bin/env bash
2set -x
7c673cae
FG
3
4#
5# Generic read/write from object store test
6#
7
8# Includes
9source "`dirname $0`/test_common.sh"
10
11TEST_POOL=rbd
12
13# Functions
14my_write_objects() {
15 write_objects $1 $2 10 1000000 $TEST_POOL
16}
17
18setup() {
19 export CEPH_NUM_OSD=$1
20
21 # Start ceph
22 ./stop.sh
23
24 ./vstart.sh -d -n || die "vstart.sh failed"
25}
26
27read_write_1_impl() {
28 write_objects 1 2 100 8192 $TEST_POOL
29 read_objects 2 100 8192
30
31 write_objects 3 3 10 81920 $TEST_POOL
32 read_objects 3 10 81920
33
34 write_objects 4 4 100 4 $TEST_POOL
35 read_objects 4 100 4
36
37 write_objects 1 2 100 8192 $TEST_POOL
38 read_objects 2 100 8192
39
40 # success
41 return 0
42}
43
44read_write_1() {
45 setup 3
46 read_write_1_impl
47}
48
49run() {
50 read_write_1 || die "test failed"
51}
52
53$@