From acd49c513337fbb8a9247a03eb5c22e5f6f46e5c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 29 Jan 2013 13:46:02 -0800 Subject: qa: add aborted readdir workunit Try to trigger aborts of readdir requests, as this can trigger a different path on the kernel client. Signed-off-by: Sage Weil --- qa/workunits/misc/aborted_readdir.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 qa/workunits/misc/aborted_readdir.sh 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 -- cgit v1.2.1