]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Go back to $PWD in fsstress.sh if compiling from source.
authorSandon Van Ness <sandon@inktank.com>
Tue, 8 Oct 2013 19:08:08 +0000 (12:08 -0700)
committerSandon Van Ness <sandon@inktank.com>
Tue, 8 Oct 2013 19:08:08 +0000 (12:08 -0700)
Although fsstress was being called with a static path the directory
it was writing to was in the current directory so doing a cd to the
source directory that is made in /tmp and then removing it later
caused it to be unable to write the files in a non-existent dir.

This change gets the current path first and cd's back into it after
it is done compiling fsstress.

Issue #6479.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Alfredo Deza <alfredo.deza@inktank.com>
qa/workunits/suites/fsstress.sh

index d511e375f6f884b4a893e1ef98b36628326a7b4f..394e5fad991ea5cfc0c2f05054bd32cf8957a7b5 100755 (executable)
@@ -1,5 +1,22 @@
 #!/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 -avf /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"