test: Fix user_space, testing use of copy_from_user / copy_to_user

Change-Id: I2caef1ba6597f693dc4f773ef8fedbd837c45ce6
This commit is contained in:
Masamichi Takagi
2018-11-29 11:32:42 +09:00
parent 715f67f32f
commit 502463ed9e
13 changed files with 42 additions and 22 deletions

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel reboot ...."
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done."
}
@ -61,6 +61,7 @@ source ${HOME}/.mck_test_config
mkdir -p result
reboot
#LTP programを実行 logを保存
${MCK_DIR}/bin/mcexec ${LTP}/testcases/bin/futex_wait01 >./result/futex_wait01.log

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel reboot ...."
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done."
}
@ -61,10 +61,13 @@ source ${HOME}/.mck_test_config
mkdir -p ./result
reboot "-m256m@0,256m@1"
# Don't forget to allocate memory from 2 NUMA nodes
reboot
ltp_test "move_pages01"
reboot "-m256m@0,256m@1"
reboot
#LTP programを実行 logを保存
sudo ${MCK_DIR}/bin/mcexec ${LTP}/testcases/bin/move_pages02 > \
./result/move_pages02.log

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel reboot ...."
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done."
}

View File

@ -3,4 +3,5 @@ perf_event_open01 2 TPASS :
perf_event_open01 3 TPASS :
perf_event_open01 4 TPASS :
perf_event_open01 5 TPASS :
perf_event_open01 6 TFAIL :
perf_event_open01 6 TCONF :
perf_event_open01 7 TCONF :

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel reboot ...."
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done."
}
@ -66,6 +66,7 @@ source ${HOME}/.mck_test_config
mkdir -p ./result
reboot
#LTP programを実行 logを保存
sudo ${MCK_DIR}/bin/mcexec ${LTP}/testcases/bin/process_vm01 -r > \
./result/process_vm_readv01.log

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel reboot ...."
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done."
}

View File

@ -1,4 +1,4 @@
process_vm_readv 1 TPASS : expected ret success - returned value = 4096
process_vm_readv 1 TPASS :
process_vm_readv 2 TPASS : expected ret success - returned value = -1
process_vm_readv 3 TPASS : expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
process_vm_readv 4 TPASS : expected ret success - returned value = -1
@ -7,7 +7,7 @@ process_vm_readv 6 TPASS : expected ret success - returned value = -1
process_vm_readv 7 TPASS : expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
process_vm_readv 8 TPASS : expected ret success - returned value = -1
process_vm_readv 9 TPASS : expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
process_vm_readv 10 TPASS : expected ret success - returned value = 4096
process_vm_readv 10 TPASS :
process_vm_readv 11 TPASS : expected ret success - returned value = -1
process_vm_readv 12 TPASS : expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
process_vm_readv 13 TPASS : expected ret success - returned value = -1

View File

@ -1,2 +1 @@
process_vm_readv03 1 TFAIL : process_vm_readv03.c:186: process_vm_readv: errno=EFAULT(14): Bad address
process_vm_readv03 1 TFAIL : process_vm_readv03.c:103: child 1 returns 256
process_vm_readv03 1 TPASS : child 1: all bytes are correctly received.

View File

@ -31,7 +31,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel booting... " 1>&2
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done." 1>&2
}
TEST_PARAM_FILE=$1
@ -46,6 +46,10 @@ source ./config
# read test param
source ${TEST_PARAM_FILE}
if ! which mpicc | grep '/usr/lib64/mpich-3.2/bin/mpicc' >/dev/null; then
printf "mpich not found.\n Do the following:\n\tmodule clear && module load mpi/mpich-3.2-x86_64\n"
fi
# make machinefile
mkdir ./machinefiles &> /dev/null
MFILE=./machinefiles/mfile_${TEST_PREFIX}
@ -109,6 +113,7 @@ do
done
ok_out "ql_server and usr_prgs are not running on each node"
make -C $(dirname ${USR_PRG_A}) $(basename ${USR_PRG_A})
### usr_prg_A を実行するql_mpiexec_start の返り値が0 (成功)
env QL_TEST=${envs_1st_A} ${START} -machinefile ${MFILE} -n ${PROC_NUM} ${USR_PRG_A} ${args_1st_A} > ${start_1st_A_log}
rc=$?
@ -162,7 +167,7 @@ ok_out "usr_prg_A's calculation is done on each node"
### ql_mpiexec_start の完了後、usr_prg_A が再開指示待ちになっている
for node in ${node_arry[@]}
do
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_A'" | grep " exe" | wc -l`
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_A'" | awk '{ print $2 }' | grep mcexec | wc -l`
if [ ${cnt} -eq 0 ]; then
ng_out "usr_prg_A is not running on ${node}"
else
@ -171,6 +176,7 @@ do
done
ok_out "usr_prg_A is waiting for resume-req on each node"
make -C $(dirname ${USR_PRG_B}) $(basename ${USR_PRG_B})
### usr_prg_B を実行するql_mpiexec_start の返り値が0 (成功)
${START} -machinefile ${MFILE} -n ${PROC_NUM} ${USR_PRG_B} 1 2 3 > ${start_1st_B_log}
rc=$?
@ -194,7 +200,7 @@ ok_out "usr_prg_B's calculation is done on each node"
### ql_mpiexec_start の完了後、usr_prg_B が再開指示待ちになっている
for node in ${node_arry[@]}
do
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_B'" | grep " exe" | wc -l`
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_B'" | awk '{ print $2 }' | grep mcexec | wc -l`
if [ ${cnt} -eq 0 ]; then
ng_out "usr_prg_B is not running on ${node}"
else
@ -203,6 +209,7 @@ do
done
ok_out "usr_prg_B is waiting for resume-req on each node"
make -C $(dirname ${USR_PRG_C}) $(basename ${USR_PRG_C})
### usr_prg_C を実行するql_mpiexec_start の返り値が0 (成功)
${START} -machinefile ${MFILE} -n ${PROC_NUM} ${USR_PRG_C} a b c > ${start_1st_C_log}
rc=$?
@ -226,7 +233,7 @@ ok_out "usr_prg_C's calculation is done on each node"
### ql_mpiexec_start の完了後、usr_prg_C が再開指示待ちになっている
for node in ${node_arry[@]}
do
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_C'" | grep " exe" | wc -l`
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_C'" | awk '{ print $2 }' | grep mcexec | wc -l`
if [ ${cnt} -eq 0 ]; then
ng_out "usr_prg_C is not running on ${node}"
else
@ -280,7 +287,7 @@ ok_out "(again) usr_prg_A's calculation is done on each node"
### ql_mpiexec_start の完了後、usr_prg_A が再開指示待ちになっている
for node in ${node_arry[@]}
do
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_A'" | grep " exe" | wc -l`
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_A'" | awk '{ print $2 }' | grep mcexec | wc -l`
if [ ${cnt} -eq 0 ]; then
ng_out "usr_prg_A is not running on ${node}"
else
@ -312,7 +319,7 @@ ok_out "(again) usr_prg_B's calculation is done on each node"
### ql_mpiexec_start の完了後、usr_prg_B が再開指示待ちになっている
for node in ${node_arry[@]}
do
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_B'" | grep " exe" | wc -l`
cnt=`ssh $node "pgrep -u ${ME} -fl 'usr_prg_B'" | awk '{ print $2 }' | grep mcexec | wc -l`
if [ ${cnt} -eq 0 ]; then
ng_out "usr_prg_B is not running on ${node}"
else

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel booting... " 1>&2
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done." 1>&2
}
@ -42,6 +42,8 @@ source ./config
mkdir -p ./result
reboot
make
#programを実行 logを保存
${MCK_DIR}/bin/mcexec ./swaptest 2 >./result/swapout_copy_from.log

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel booting... " 1>&2
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done." 1>&2
}
@ -42,6 +42,8 @@ source ./config
mkdir -p result
reboot
make
#programを実行 logを保存
${MCK_DIR}/bin/mcexec ./swaptest 2 >./result/swapout_copy_to_01.log

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel booting... " 1>&2
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done." 1>&2
}
@ -42,6 +42,8 @@ source ./config
mkdir -p ./result
reboot
make
#programを実行 logを保存
${MCK_DIR}/bin/mcexec ./swaptest 2 >./result/swapout_copy_to_02.log

View File

@ -14,7 +14,7 @@ function reboot() {
# echo "done."
#sleep 1
echo -n "mckernel booting... " 1>&2
sudo ${MCK_DIR}/sbin/mcreboot.sh $*
sudo ${MCK_DIR}/sbin/mcreboot.sh $BOOTPARAM
echo "done." 1>&2
}
@ -42,6 +42,8 @@ source ./config
mkdir -p result
reboot
make
#programを実行 logを保存
${MCK_DIR}/bin/mcexec ./swaptest 2 >./result/swapout_normal.log