开发者
资源
鲲鹏环境下编译ltp-full-20160510过程及ltp长稳测试参考
鲲鹏环境下编译ltp-full-20160510过程及ltp长稳测试参考
发表于2024/02/23
881

1、上传 ltp-full-20160510.tar.xz到/home目录


2、编译如下:
tar xf ltp-full-20160510.tar.xz
cd ltp-full-20160510
make autotools 
for i in $(find ./ -name *.c); do sed -i 's!#include <rpcsvc/rusers.h>!!g' $i ;done
sed -i '35 aFILTER_OUT_DIRS += ustat' testcases/kernel/syscalls/Makefile
sed -i '46 a#include <sys/sysmacros.h>' testcases/kernel/syscalls/mount/mount02.c
sed -i '50 a#include <attr/attributes.h>'  ./testcases/kernel/syscalls/setxattr/setxattr01.c
sed -i '58 a#include <sys/sysmacros.h>' testcases/kernel/syscalls/setxattr/setxattr02.c
sed -i '73 a#include <sys/sysmacros.h>' testcases/kernel/syscalls/open/open11.c
sed -i '48 a#include <sys/sysmacros.h>' testcases/kernel/syscalls/readahead/readahead02.c
sed -i '45 a#include <attr/attributes.h>' testcases/kernel/syscalls/removexattr/removexattr02.c
sed -i '45 a#include <attr/attributes.h>' testcases/kernel/syscalls/removexattr/removexattr01.c
sed -i '45 a#include <attr/attributes.h>' ./testcases/kernel/syscalls/getxattr/getxattr01.c
sed -i '45 a#include <sys/sysmacros.h>' testcases/kernel/syscalls/getxattr/getxattr01.c
sed -i '45 a#include <sys/sysmacros.h>' testcases/kernel/syscalls/getxattr/getxattr02.c
sed -i '45 a#include <sys/sysmacros.h>' testcases/kernel/syscalls/mknod/mknod01.c
sed -i '45 a#include <sys/sysmacros.h>' testcases/kernel/device-drivers/tbio/tbio_user/tbio.c
sed -i '425s/WEXITSTATUS(status)/-1/' testcases/kernel/sched/tool/trace_sched.c
./configure 
make -j64
make install


3、测试:
cd /opt/ltp
vim testscripts/ltpstress.sh


找到关键字genload
  genload --vm $PROC_NUM --vm-bytes 1073741824 >/dev/null 2>&1 &
增加-c $(cat /proc/cpuinfo |grep processor|wc -l),修改如下
  genload -c $(cat /proc/cpuinfo |grep processor|wc -l) --vm $PROC_NUM --vm-bytes 1073741824 >/dev/null 2>&1 &


nohup ./testscripts/ltpstress.sh -n -t 168 & #168表示测试168小时

收藏举报
Level 1
0
帖子
0
粉丝
0
获赞