freeze: add freeze_thaw test
Change-Id: I31db80b89adca9ac354a96ad21073b269d8a0e24
This commit is contained in:
committed by
Masamichi Takagi
parent
83ade5cdcd
commit
ec31d72483
44
test/freeze_thaw/tp/300.sh
Normal file
44
test/freeze_thaw/tp/300.sh
Normal file
@ -0,0 +1,44 @@
|
||||
#!/bin/env bash
|
||||
# 300.sh COPYRIGHT FUJITSU LIMITED 2019
|
||||
script_dir="$(cd "$(dirname "${BASH_SOURCE:-${(%):-%N}}")"; pwd)"
|
||||
. "$script_dir/../function"
|
||||
|
||||
#
|
||||
# init
|
||||
#
|
||||
is_os_running
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "error: os status is not running"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# run
|
||||
#
|
||||
sh "$script_dir/300_thread.sh"&
|
||||
sh_pid=$!
|
||||
|
||||
echo "freeze-thaw:"
|
||||
for i in `seq 1 20`
|
||||
do
|
||||
echo -n "."
|
||||
freeze
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "error: freeze($i)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
thaw
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "error: thaw($i)"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
|
||||
#
|
||||
# fin
|
||||
#
|
||||
kill $sh_pid
|
||||
sleep 1
|
||||
exit 0
|
||||
Reference in New Issue
Block a user