stress_tests: extractloop: run two loops in parallel

This increases the load but also the disk space requirements
(to about 2GB).
This commit is contained in:
Jakob Unterwurzacher 2016-05-05 14:17:05 +02:00
parent 730291feab
commit d56f1ee179

View File

@ -16,17 +16,22 @@ cd $DIR2
# Just ignore fusermount errors. # Just ignore fusermount errors.
trap "cd /; fusermount -u -z $DIR2; rm -rf $DIR1 $DIR2" EXIT trap "cd /; fusermount -u -z $DIR2; rm -rf $DIR1 $DIR2" EXIT
# Loop function loop {
N=1 # Note: $$ returns the PID of the *parent* shell
while true mkdir $BASHPID
do cd $BASHPID
echo -n "$N "
echo -n "extract " N=1
tar xf /tmp/linux-3.0.tar.gz while true
echo -n "diff " do
diff -ur linux-3.0 /tmp/linux-3.0 echo "Process $BASHPID iteration $N: $(date)"
echo -n "rm " tar xf /tmp/linux-3.0.tar.gz
rm -Rf linux-3.0 diff -ur linux-3.0 /tmp/linux-3.0
date rm -Rf linux-3.0
let N=$N+1 let N=$N+1
done done
}
loop &
loop &
wait