Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
jdurgin committed Nov 21, 2013
2 parents 72bba1f + f753d56 commit b493178
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4069,7 +4069,7 @@ void OSD::do_command(Connection *con, tid_t tid, vector<string>& cmd, bufferlist
int64_t bsize;
// default count 1G, size 4MB
cmd_getval(cct, cmdmap, "count", count, (int64_t)1 << 30);
cmd_getval(cct, cmdmap, "bsize", bsize, (int64_t)4 << 20);
cmd_getval(cct, cmdmap, "size", bsize, (int64_t)4 << 20);

bufferlist bl;
bufferptr bp(bsize);
Expand Down
11 changes: 10 additions & 1 deletion src/test/pybind/test_rados.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def test_write(self):
eq(self.object.read(3), 'bar')
eq(self.object.read(3), 'baz')

class TestMonCommand(object):
class TestCommand(object):

def setUp(self):
self.rados = Rados(conffile='')
Expand Down Expand Up @@ -373,3 +373,12 @@ def test_monmap_dump(self):
d = json.loads(buf)
assert('epoch' in d)

def test_osd_bench(self):
cmd = dict(prefix='bench', size=4096, count=8192)
ret, buf, err = self.rados.osd_command(0, json.dumps(cmd), '',
timeout=30)
eq(ret, 0)
assert len(err) > 0
out = json.loads(err)
eq(out['blocksize'], cmd['size'])
eq(out['bytes_written'], cmd['count'])
4 changes: 2 additions & 2 deletions src/test/pybind/test_rbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
IMG_SIZE = 8 << 20 # 8 MiB
IMG_ORDER = 22 # 4 MiB objects

def setUp():
def setup_module():
global rados
rados = Rados(conffile='')
rados.connect()
Expand All @@ -31,7 +31,7 @@ def setUp():
if features is not None:
features = int(features)

def tearDown():
def teardown_module():
global ioctx
ioctx.__del__()
global rados
Expand Down

0 comments on commit b493178

Please sign in to comment.