perf buildid-cache: Add test for 16-byte build-id
authorNicholas Fraser <nfraser@codeweavers.com>
Tue, 16 Feb 2021 20:38:08 +0000 (15:38 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 18 Feb 2021 19:40:30 +0000 (16:40 -0300)
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 <nfraser@codeweavers.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Huw Davies <huw@codeweavers.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kim Phillips <kim.phillips@amd.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Remi Bernon <rbernon@codeweavers.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Tommi Rantala <tommi.t.rantala@nokia.com>
Cc: Ulrich Czekalla <uczekalla@codeweavers.com>
Link: https://lore.kernel.org/r/c08be235-7434-5208-5f21-e8c9a3265464@codeweavers.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/buildid.sh

index 4861a20..416af61 100755 (executable)
@@ -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}"
 }