ceph/qa/workunits/suites/fsstress.sh
Yan, Zheng 479f2a760b qa/fsstress.sh: fix 'cp not writing through dangling symlink'
On some test machines, /usr/lib/ltp/testcases/bin/fsstress is
dangling symlink. 'cp -f' is impotent in this case.

Fixes: #12710
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-18 15:26:34 +08:00

25 lines
812 B
Bash
Executable File

#!/bin/bash
if [ ! -f /usr/lib/ltp/testcases/bin/fsstress ]
then
path=`pwd`
mkdir -p /tmp/fsstress
cd /tmp/fsstress
wget -q -O /tmp/fsstress/ltp-full.tgz http://ceph.com/qa/ltp-full-20091231.tgz
tar xzf /tmp/fsstress/ltp-full.tgz
rm /tmp/fsstress/ltp-full.tgz
cd /tmp/fsstress/ltp-full-20091231/testcases/kernel/fs/fsstress
make
sudo mkdir -p /usr/lib/ltp/testcases/bin
sudo cp -av --remove-destination /tmp/fsstress/ltp-full-20091231/testcases/kernel/fs/fsstress/fsstress /usr/lib/ltp/testcases/bin/fsstress
sudo chmod 755 /usr/lib/ltp/testcases/bin/fsstress
rm -Rf /tmp/fsstress
cd $path
fi
command="/usr/lib/ltp/testcases/bin/fsstress -d fsstress-`hostname`$$ -l 1 -n 1000 -p 10 -v"
echo "Starting fsstress $command"
mkdir fsstress`hostname`-$$
$command