~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/test/test_rw.sh

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
# Functions
 
11
my_write_objects() {
 
12
        write_objects $1 $2 10 1000000 data
 
13
}
 
14
 
 
15
setup() {
 
16
        export CEPH_NUM_OSD=$1
 
17
 
 
18
        # Start ceph
 
19
        ./stop.sh
 
20
 
 
21
        ./vstart.sh -d -n || die "vstart.sh failed"
 
22
}
 
23
 
 
24
read_write_1_impl() {
 
25
        write_objects 1 2 100 8192 data
 
26
        read_objects 2 100 8192 
 
27
 
 
28
        write_objects 3 3 10 81920 data
 
29
        read_objects 3 10 81920 
 
30
 
 
31
        write_objects 4 4 100 4 data
 
32
        read_objects 4 100 4
 
33
 
 
34
        write_objects 1 2 100 8192 data
 
35
        read_objects 2 100 8192
 
36
 
 
37
        # success
 
38
        return 0
 
39
}
 
40
 
 
41
read_write_1() {
 
42
        setup 3
 
43
        read_write_1_impl
 
44
}
 
45
 
 
46
run() {
 
47
        read_write_1 || die "test failed"
 
48
}
 
49
 
 
50
$@