【原文链接】基于openEuler系统执行Linux内核性能测试脚本(lkp-tests)的流程
(1)若没有openEuler操作系统的虚拟机,则可以参考 VMware安装openEuler-22.03-LTS版本的虚拟机 安装一台openEuler操作系统的虚拟机
(1)下载lkp-tests测试代码
cd /opt
git clone https://gitee.com/wu_fengguang/lkp-tests.git
(2)安装基础依赖
cd lkp-tests
make install
(3)验证lkp是否安装成功
如下,可以查看到帮助信息,表示lkp已经安装成功了
[root@openEuler-1 lkp-tests]# lkp help
Usage: lkp <command> [options]
INSTALLATION
install JOB install binary dependencies for JOB
JOB
split JOB split JOB matrix
compile JOB compile JOB into shell script
TESTING
run JOB run test JOB locally
qemu JOB run test JOB in QEMU virtual machine
RESULT
result|rt|_rt|__rt PATTERNs show result dirs
ls|ll PATTERNs ls result dirs
rm-path result remove result dirs
_rm PATTERNs remove _result dirs
stat [options] show result stats
compare [options] compare result stats
DEBUG
irb run irb with lib/*.rb loaded
pry run pry with lib/*.rb loaded
More commands can be found in /opt/lkp-tests/{bin,sbin,tools}/
[root@openEuler-1 lkp-tests]#
(4)安装lkp-tests的依赖
lkp install
(5)查看当前可执行的任务
[root@openEuler-1 lkp-tests]# ls jobs/
boot-trace.yaml borrow-30d.yaml debug.yaml local-tests nfs-iozone.yaml pbzip2.yaml rdma-pyverbs.yml send-email.yaml
boot.yaml build-linux.yaml hibernate-stress.yaml mariadb.yaml nfs-test.yaml perf-batch.yaml README.md ssh-on-fail.yaml
borrow-10d.yaml ceph.yaml hibernate.yaml multi-docker.yaml oltp.yaml pgbench.yaml replace-repo.yaml ssh.yaml
borrow-1d.yaml cgroup2-test.yaml install-iso-firstboot.yaml multi-qemu-docker-selftest.yaml os-matrix-aarch64.yaml pixz.yaml rocksdb.yaml stop_firewalld.yaml
borrow-1h.yaml cgroup2.yaml install-iso.yaml multi-qemu-docker.yaml os-matrix-dc.yaml plzip.yaml secrets_info.yaml yocto.yaml
borrow-1w.yaml cluster-ssh-trust.yaml intel-ipsec-mb multi-qemu.yaml os-matrix-x86.yaml pxz.yaml send-email-on-fail.yaml yum-update.yaml
[root@openEuler-1 lkp-tests]#
(6)比如执行 nfs-test.yaml的job,首先分割任务
[root@openEuler-1 lkp-tests]# lkp split-job jobs/nfs-test.yaml
jobs/nfs-test.yaml => ./nfs-test-30.yaml
[root@openEuler-1 lkp-tests]#
(7)安装子任务的依赖
[root@openEuler-1 lkp-tests]# lkp split-job jobs/nfs-test.yaml
jobs/nfs-test.yaml => ./nfs-test-30.yaml
[root@openEuler-1 lkp-tests]# lkp install ./nfs-test-30.yaml
make -C /opt/lkp-tests/bin/event
make: 进入目录“/opt/lkp-tests/bin/event”
gcc -c -o wakeup.o wakeup.c
gcc -static wakeup.o -o wakeup
make: 离开目录“/opt/lkp-tests/bin/event”
Installing packages procps-ng
[root@openEuler-1 lkp-tests]#
(8)执行子任务
[root@openEuler-1 lkp-tests]# lkp run ./nfs-test-30.yaml
RESULT_ROOT=/root/.cache/lkp/result/nfs-test/30/0
sleep started
kill 71979 vmstat --timestamp -n 10
kill 71975 dmesg --follow --decode
wait for background processes: 71984 71973 meminfo nfs-hang
Job results saved to /root/.cache/lkp/result/nfs-test/30/0
[root@openEuler-1 lkp-tests]#
(9)根据上述提示,执行的结果均存放在 /root/.cache/lkp/result/nfs-test/30/0 目录,主要生成以下文件
[root@openEuler-1 lkp-tests]# ls /root/.cache/lkp/result/nfs-test/30/0
dmesg.json job.sh kmsg matrix.csv meminfo.gz nfs-hang sleep sleep.time stats.csv time
heartbeat job.yaml kmsg.json matrix.json.gz meminfo.json.gz program_list sleep.json sleep.time.json stats.json time.json
[root@openEuler-1 lkp-tests]#