4 #Check if there are two threads,one keeps calling read() or lseek(), and
5 #the other calling readdir(), both on the same directory fd.
7 # Based on a testcase from Li Zefan <lizefan@huawei.com>.
9 # http://marc.info/?l=linux-kernel&m=136123703211869&w=2
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2013 HuaWei. All Rights Reserved.
14 # This program is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License as
16 # published by the Free Software Foundation.
18 # This program is distributed in the hope that it would be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write the Free Software Foundation,
25 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #-----------------------------------------------------------------------
29 owner=zhaohongjiang@huawei.com
32 echo "QA output created by $seq"
34 status=1 # failure is the default!
40 trap "_cleanup; exit \$status" 0 1 2 3 15
42 # get standard environment, filters and checks
46 # real QA test starts here
51 for n in {1..4096}; do
52 touch $TEST_DIR/tmp/$n
57 src/t_readdir_1 $TEST_DIR/tmp &
59 killall src/t_readdir_1
64 src/t_readdir_2 $TEST_DIR/tmp &
66 killall src/t_readdir_2