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