X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftest%2Flibrbd%2Frbdrw.py;fp=src%2Fceph%2Fsrc%2Ftest%2Flibrbd%2Frbdrw.py;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=8dbbda24c1c1b8b3720320a74884c530cb858d4e;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/test/librbd/rbdrw.py b/src/ceph/src/test/librbd/rbdrw.py deleted file mode 100644 index 8dbbda2..0000000 --- a/src/ceph/src/test/librbd/rbdrw.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -""" -Loop writing/reading the first 4k of image argv[1] in pool rbd, -after acquiring exclusive lock named argv[2]. When an exception -happens, split off the last number in the exception 'args' string -and use it as the process exit code, if it's convertible to a number. - -Designed to run against a blacklist operation and verify the -ESHUTDOWN expected from the image operation. - -Note: this cannot be run with writeback caching on, currently, as -writeback errors cause reads be marked dirty rather than error, and -even if they were marked as errored, ObjectCacher would retry them -rather than note them as errored. -""" - -import rados, rbd, sys - -with rados.Rados(conffile='') as r: - with r.open_ioctx('rbd') as ioctx: - try: - with rbd.Image(ioctx, sys.argv[1]) as image: - image.lock_exclusive(sys.argv[2]) - while True: - image.write(b'A' * 4096, 0) - r = image.read(0, 4096) - except rbd.ConnectionShutdown: - # it so happens that the errno here is 108, but - # anything recognizable would do - exit(108)