mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
[t:4382] better child handling
git-svn-id: file:///svn/toku/tokudb@38701 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
233f8f978a
commit
a9c0362b06
1 changed files with 27 additions and 5 deletions
|
@ -174,6 +174,21 @@ done
|
|||
mkdir -p $log
|
||||
mkdir -p $savedir
|
||||
|
||||
declare -a pids
|
||||
i=0
|
||||
|
||||
savepid() {
|
||||
pids[i]=$1
|
||||
(( i = i + 1 ))
|
||||
}
|
||||
|
||||
killchildren() {
|
||||
for pid in ${pids[@]}
|
||||
do
|
||||
kill $pid
|
||||
done
|
||||
}
|
||||
|
||||
for exec in ${testnames[@]}
|
||||
do
|
||||
for table_size in 2000 200000 50000000
|
||||
|
@ -181,11 +196,18 @@ do
|
|||
(( small_cachetable = table_size * 50 ))
|
||||
suffix="${exec}-${table_size}-${small_cachetable}-$$"
|
||||
touch "${log}/${suffix}"
|
||||
loop_test $exec $table_size $small_cachetable "${log}/${suffix}" "${savedir}/${suffix}" &
|
||||
tail -f "${log}/${suffix}" &
|
||||
loop_test $exec $table_size $small_cachetable "${log}/${suffix}" "${savedir}/${suffix}" & savepid $!
|
||||
tail -f "${log}/${suffix}" & savepid $!
|
||||
suffix="${exec}-${table_size}-1000000000-$$"
|
||||
touch "${log}/${suffix}" &
|
||||
loop_test $exec $table_size 1000000000 "${log}/${suffix}" "${savedir}/${suffix}" &
|
||||
tail -f "${log}/${suffix}" &
|
||||
touch "${log}/${suffix}"
|
||||
loop_test $exec $table_size 1000000000 "${log}/${suffix}" "${savedir}/${suffix}" & savepid $!
|
||||
tail -f "${log}/${suffix}" & savepid $!
|
||||
done
|
||||
done
|
||||
|
||||
trap killchildren INT TERM EXIT
|
||||
|
||||
for pid in ${pids[@]}
|
||||
do
|
||||
wait $pid
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue