Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf test: Simplify data symbol test

Now the workload will end after 1 second. Just run it with perf instead
of waiting for the background process.

Reviewed-by: Leo Yan <leo.yan@arm.com>
Tested-by: Thomas Richter <tmricht@linux.ibm.com>
Tested-by: Thomas Falcon <thomas.falcon@intel.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Leo Yan <leo.yan@arm.com>
Link: https://lore.kernel.org/r/20250304022837.1877845-7-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

+2 -13
+2 -13
tools/perf/tests/shell/test_data_symbol.sh
··· 5 5 # Leo Yan <leo.yan@linaro.org>, 2022 6 6 7 7 shelldir=$(dirname "$0") 8 - # shellcheck source=lib/waiting.sh 9 - . "${shelldir}"/lib/waiting.sh 10 8 11 9 # shellcheck source=lib/perf_has_symbol.sh 12 10 . "${shelldir}"/lib/perf_has_symbol.sh ··· 58 60 # specific CPU and test in per-CPU mode. 59 61 is_amd=$(grep -E -c 'vendor_id.*AuthenticAMD' /proc/cpuinfo) 60 62 if (($is_amd >= 1)); then 61 - perf mem record -vvv -o ${PERF_DATA} -C 0 -- taskset -c 0 $TEST_PROGRAM 2>"${ERR_FILE}" & 63 + perf mem record -vvv -o ${PERF_DATA} -C 0 -- taskset -c 0 $TEST_PROGRAM 2>"${ERR_FILE}" 62 64 else 63 - perf mem record -vvv --all-user -o ${PERF_DATA} -- $TEST_PROGRAM 2>"${ERR_FILE}" & 65 + perf mem record -vvv --all-user -o ${PERF_DATA} -- $TEST_PROGRAM 2>"${ERR_FILE}" 64 66 fi 65 - 66 - PERFPID=$! 67 - 68 - wait_for_perf_to_start ${PERFPID} "${ERR_FILE}" 69 - 70 - sleep 1 71 - 72 - kill $PERFPID 73 - wait $PERFPID 74 67 75 68 check_result 76 69 exit $?