ETH_S_FUNC_PARALLEL_PROCESSING:
source 'common.sh';
prepare_nfs_mount.sh "/mnt/nfs_mount"|| die "Mounting NFS Failed";
multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING # dd if=/dev/urandom of=/mnt/nfs_mount/dd_test bs=1M count=100" -l "-n 2 -a 0x1 -d 1";
unmount_nfs.sh "/mnt/nfs_mount"
prepare_nfs_mount.sh:
source "common.sh" # Import do_cmd(), die() and other functions
if [ -n "$1" ]
then
mount_point=$1
`check_env_var 'NFS_SERVER'`
`check_env_var 'NFS_ROOT_PATH'`
mkdir -p $mount_point
umount $mount_point
mount -t nfs -o nolock,addr=$NFS_SERVER $NFS_SERVER':'$NFS_ROOT_PATH $mount_point
else
die "NFS mount point needs to be provided as parameter to script"
fi
check_env_var in common.sh 看看是否存在这个环境变量
check_env_var() {
output_str=`env|grep $1`
if [ ${#output_str} == 0 ]
then
die "$1 not defined"
fi
}
所以需要定义NFS_SERVER和NFS_ROOT_PATH,可以放在env_tools.sh(自己编的一个脚本在目录E: 3_Work32_PSOC321_LxT oolsinary_psoc_server)中
export NFS_SERVER=192.168.40.41
export NFS_ROOT_PATH=/home/zhangyi/work/psoc_ltp/ltp_mnt
mount -t nfs -o nolock,addr=$NFS_SERVER $NFS_SERVER':'$NFS_ROOT_PATH $mount_point
挂接有问题,改为
mount -t nfs -o nolock,addr=$NFS_SERVER,nfsvers=3,vers=3 $NFS_SERVER':'$NFS_ROOT_PATH $mount_point
multi_run_processes.sh -s "/opt/ltp/runltp -f ddt/eth_ping -P $PLATFORM -s ETH_XS_FUNC_PING # dd if=/dev/urandom of=/mnt/nfs_mount/dd_test bs=1M count=100" -l "-n 2 -a 0x1 -d 1";
# usage:
# multi_run_processes.sh <process list> [<process list2> ...] -v
# where -v is an optional flag and when present indicates that priority
# of two processes has to be verified using time taken
# for process execution
#
# process_list= -s "#-separated commands" -l "-n <num_instances>
# -a <cpu affinity mask> -d <inter-process start delay>
# -p <priority> -r <realtime priority>"
-s "#-separated commands" #命令
-n <num_instances>. #跑几个process
-a <cpu affinity mask>