summaryrefslogtreecommitdiff
path: root/qa/workunits/misc/aborted_readdir.sh
blob: 37fdef595a2f14d1ad44528a5bcc061e5a7cd23c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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