diff options
author | Sage Weil <sage@inktank.com> | 2013-01-29 13:46:02 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-01-29 13:46:02 -0800 |
commit | acd49c513337fbb8a9247a03eb5c22e5f6f46e5c (patch) | |
tree | 76c1f12275ce4480663e99fe684235b0194dab76 | |
parent | 0b66994c180b1ce5856a38518423d82fbebc8a2e (diff) | |
download | ceph-wip-readdir.tar.gz |
qa: add aborted readdir workunitwip-readdir
Try to trigger aborts of readdir requests, as this can trigger a different
path on the kernel client.
Signed-off-by: Sage Weil <sage@inktank.com>
-rwxr-xr-x | qa/workunits/misc/aborted_readdir.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/qa/workunits/misc/aborted_readdir.sh b/qa/workunits/misc/aborted_readdir.sh new file mode 100755 index 00000000000..37fdef595a2 --- /dev/null +++ b/qa/workunits/misc/aborted_readdir.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +# first stage a bunch of files +echo "mkaing dirs..." +find /usr/bin -type d -exec mkdir -p .\{\} \; +echo "touchign files..." +find /usr/bin -type f -exec touch .\{\} \; + +# try to drop caches +echo "dropping caches..." +echo 2 > /proc/sys/vm/drop_caches || true + +# try to abort a readdir +for f in `seq 1 10`; do + echo "iteration $f..." + find . & + CH=$! + sleep .1 + kill -9 $CH || true + wait +done + +echo OK |