From: Nicholas Fraser Date: Tue, 16 Feb 2021 20:38:08 +0000 (-0500) Subject: perf buildid-cache: Add test for 16-byte build-id X-Git-Tag: v5.12-rc1~82^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=206236d328ee02b171188dfc961aa0d13943c76e;p=thirdparty%2Fkernel%2Fstable.git perf buildid-cache: Add test for 16-byte build-id tests/shell/buildid.sh added an ELF executable with an MD5 build-id to the perf debug cache but did not check whether the object was printed by a subsequent call to "perf buildid-cache -l". It was being omitted from the list. A previous commit fixed the bug that left it out of the list. This adds a test for it. Signed-off-by: Nicholas Fraser Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Frank Ch. Eigler Cc: Huw Davies Cc: Ian Rogers Cc: Ingo Molnar Cc: Kim Phillips Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Remi Bernon Cc: Song Liu Cc: Tommi Rantala Cc: Ulrich Czekalla Link: https://lore.kernel.org/r/c08be235-7434-5208-5f21-e8c9a3265464@codeweavers.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/tests/shell/buildid.sh b/tools/perf/tests/shell/buildid.sh index 4861a20edee22..416af614bbe07 100755 --- a/tools/perf/tests/shell/buildid.sh +++ b/tools/perf/tests/shell/buildid.sh @@ -50,6 +50,12 @@ check() exit 1 fi + ${perf} buildid-cache -l | grep $id + if [ $? -ne 0 ]; then + echo "failed: ${id} is not reported by \"perf buildid-cache -l\"" + exit 1 + fi + echo "OK for ${1}" }