Skip to content

Commit

Permalink
programs/lkvs: align with latest lkvs version
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Jul 25, 2024
1 parent c166d9e commit 5f435d7
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 95 deletions.
29 changes: 22 additions & 7 deletions jobs/lkvs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,32 @@ category: functional

lkvs:
test:
- amx
- avx512vbmi
- cet
- cmpccxadd
- dsa
- edac
- fred
# - guest-test # cause machine power down
- pt
- idxd
- ifs
- tdx-compliance
- umip
# - instruction-check
- isst
- pcie
- pmu
- prefetchi
- pstate
- pt
- sdsi
- tdx-compliance
- tdx-guest
# - tdx-osv-sanity
- telemetry
- th
- workload-xsave
- thermal
- tpm
- tpmi
- umip
- workload-xsave
- xsave
- fred
- sdsi
- pmu
164 changes: 77 additions & 87 deletions lib/tests/lkvs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,96 +11,86 @@ build_libipt()

build_lkvs()
{
cd $BENCHMARK_ROOT/$testcase/lkvs && make --keep-going
[[ -f $BENCHMARK_ROOT/$testcase/lkvs/BM/$test/Makefile ]] || return 0

cd $BENCHMARK_ROOT/$testcase/lkvs/BM/$test || return

make --keep-going || {
echo "$test make fail"
return 1
}

return 0
}

fixup_tdx_compliance()
{
log_cmd insmod tdx-compliance/tdx-compliance.ko
echo all > /sys/kernel/debug/tdx/tdx-tests
log_cmd cat /sys/kernel/debug/tdx/tdx-tests
}

fixup_splitlock()
{
cat /proc/cpuinfo | grep -q split_lock_detect || die "split_lock_detect not supported on current CPU"
}

runtests()
{
cd $BENCHMARK_ROOT/$testcase/lkvs || return
cd $BENCHMARK_ROOT/$testcase/lkvs/BM || return

if [[ $(type -t "fixup_${test//-/_}") = function ]]; then
fixup_${test//-/_} || return
fi

case $test in
tests-client)
log_cmd ./runtests -f tests-client
;;
tests-server)
log_cmd ./runtests -f tests-server
;;
cet)
log_cmd ./runtests -f cet/tests
;;
guest-test)
log_cmd ./runtests -f guest-test/guest.test_launcher.sh
;;
pt)
log_cmd ./runtests -f pt/tests
;;
ufs)
log_cmd ./runtests -f ufs/tests
;;
ifs)
log_cmd ./runtests -f ifs/tests
;;
rapl-client)
log_cmd ./runtests -f rapl/tests-client
;;
rapl-server)
log_cmd ./runtests -f rapl/tests-server
;;
tdx-compliance)
log_cmd insmod tdx-compliance/tdx-compliance.ko
echo all > /sys/kernel/debug/tdx/tdx-tests
log_cmd cat /sys/kernel/debug/tdx/tdx-tests
;;
umip)
log_cmd ./runtests -f umip/tests
;;
isst)
log_cmd ./runtests -f isst/tests
;;
th)
log_cmd ./runtests -c "th/th_test 1"
log_cmd ./runtests -c "th/th_test 2"
;;
workload-xsave)
log_cmd cd workload-xsave
log_cmd mkdir build
log_cmd cd build
log_cmd cmake ..
log_cmd make
available_workloads=$(./yogini 2>&1 | grep "Available workloads" | cut -d: -f 2 | xargs)
log_cmd ../start_test.sh -1 100 $available_workloads
;;
thermal)
log_cmd ./runtests -f thermal/thermal-tests
;;
xsave)
log_cmd ./runtests -f xsave/tests
;;
fred)
log_cmd insmod fred/fred_test_driver.ko
# No doc about how to get the test result after loading the module
;;
sdsi)
log_cmd ./runtests -f sdsi/tests
;;
cstate-client)
log_cmd ./runtests -f cstate/tests-client
;;
cstate-server)
log_cmd ./runtests -f cstate/tests-server
;;
topology-client)
log_cmd ./runtests -f topology/tests-client
;;
topology-server)
log_cmd ./runtests -f topology/tests-server
;;
pmu)
log_cmd ./runtests -f pmu/tests
;;
splitlock)
cat /proc/cpuinfo | grep -q split_lock_detect || die "split_lock_detect not supported on current CPU"
log_cmd ./runtests -f splitlock/tests
;;
esac
if [[ -f $test/tests ]]; then
log_cmd ./runtests -f $test/tests
else
case $test in
cstate-client)
log_cmd ./runtests -f cstate/tests-client
;;
cstate-server)
log_cmd ./runtests -f cstate/tests-server
;;
fred)
log_cmd insmod fred/fred_test_driver.ko
# No doc about how to get the test result after loading the module
;;
guest-test)
log_cmd ./runtests -f guest-test/guest.test_launcher.sh
;;
prefetchi)
log_cmd prefetchi/prefetchi
;;
rapl-client)
log_cmd ./runtests -f rapl/tests-client
;;
rapl-server)
log_cmd ./runtests -f rapl/tests-server
;;
th)
log_cmd ./runtests -c "th/th_test 1"
log_cmd ./runtests -c "th/th_test 2"
;;
workload-xsave)
log_cmd cd workload-xsave
log_cmd mkdir build
log_cmd cd build
log_cmd cmake ..
log_cmd make
available_workloads=$(./yogini 2>&1 | grep "Available workloads" | cut -d: -f 2 | xargs)
log_cmd ../start_test.sh -1 100 $available_workloads
;;
topology-client)
log_cmd ./runtests -f topology/tests-client
;;
topology-server)
log_cmd ./runtests -f topology/tests-server
;;
*)
die "unknown $test"
;;
esac
fi
}
2 changes: 1 addition & 1 deletion programs/lkvs/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
. $LKP_SRC/lib/tests/lkvs.sh

build_libipt
build_lkvs
build_lkvs || exit

runtests

0 comments on commit 5f435d7

Please sign in to comment.