@@ -92,12 +92,12 @@ test_progs-bpf_gcc() {
9292 test_progs_helper " -bpf_gcc" " "
9393}
9494
95+ export VERISTAT_TARGET=${VERISTAT_TARGET:- kernel}
9596export VERISTAT_CONFIGS=${VERISTAT_CONFIGS:-/ mnt/ vmtest/ ci/ vmtest/ configs}
9697export WORKING_DIR=$( pwd) # veristat config expects this variable
9798
98- run_veristat_helper () {
99- local mode=" ${1} "
100-
99+ run_veristat () {
100+ foldable start run_veristat_${VERISTAT_TARGET} " Running veristat ${VERISTAT_TARGET} "
101101 # Make veristat commands visible in the log
102102 if [ -o xtrace ]; then
103103 xtrace_was_on=" 1"
@@ -109,33 +109,21 @@ run_veristat_helper() {
109109 (
110110 # shellcheck source=ci/vmtest/configs/run_veristat.default.cfg
111111 # shellcheck source=ci/vmtest/configs/run_veristat.meta.cfg
112- source " ${VERISTAT_CONFIGS} /run_veristat.${mode } .cfg"
112+ source " ${VERISTAT_CONFIGS} /run_veristat.${VERISTAT_TARGET } .cfg"
113113 pushd " ${VERISTAT_OBJECTS_DIR} "
114114
115115 " ${SELFTESTS_BPF} /veristat" -o csv -q -e file,prog,verdict,states ${VERISTAT_OBJECTS_GLOB} > \
116116 " ${OUTPUT_DIR} /${VERISTAT_OUTPUT} "
117117
118- echo " run_veristat_${mode } :$? " >> ${STATUS_FILE}
118+ echo " run_veristat_${VERISTAT_TARGET } :$? " >> ${STATUS_FILE}
119119 popd
120120 )
121121
122122 # Hide commands again
123123 if [ -z " $xtrace_was_on " ]; then
124124 set +x
125125 fi
126-
127- }
128-
129- run_veristat_kernel () {
130- foldable start run_veristat_kernel " Running veristat.kernel"
131- run_veristat_helper " kernel"
132- foldable end run_veristat_kernel
133- }
134-
135- run_veristat_meta () {
136- foldable start run_veristat_meta " Running veristat.meta"
137- run_veristat_helper " meta"
138- foldable end run_veristat_meta
126+ foldable end run_veristat_${VERISTAT_TARGET}
139127}
140128
141129foldable end vm_init
0 commit comments