3 # SPDX-License-Identifier: GPL-2.0
8 perfdata1
=$
(mktemp
/tmp
/__perf_test.perf.data.XXXXX
)
9 perfdata2
=$
(mktemp
/tmp
/__perf_test.perf.data.XXXXX
)
10 perfdata3
=$
(mktemp
/tmp
/__perf_test.perf.data.XXXXX
)
11 testprog
="perf test -w thloop"
13 shelldir
=$
(dirname "$0")
14 # shellcheck source=lib/perf_has_symbol.sh
15 .
"${shelldir}"/lib
/perf_has_symbol.sh
19 skip_test_missing_symbol
${testsym}
23 rm -rf "${perfdata1}".old
25 rm -rf "${perfdata2}".old
27 rm -rf "${perfdata3}".old
36 trap trap_cleanup EXIT TERM INT
40 if ! perf record
-o "${file}" ${testprog} 2> /dev
/null
42 echo "Workload record [Failed record]"
46 if ! perf report
-i "${file}" -q |
grep -q "${testsym}"
48 echo "Workload record [Failed missing output]"
56 echo "Basic two file diff test"
57 err
=$
(make_data
"${perfdata1}")
62 err
=$
(make_data
"${perfdata2}")
68 if ! perf
diff "${perfdata1}" "${perfdata2}" | grep -q "${testsym}"
70 echo "Basic two file diff test [Failed diff]"
74 echo "Basic two file diff test [Success]"
78 echo "Basic three file diff test"
79 err
=$
(make_data
"${perfdata1}")
84 err
=$
(make_data
"${perfdata2}")
89 err
=$
(make_data
"${perfdata3}")
95 if ! perf
diff "${perfdata1}" "${perfdata2}" "${perfdata3}" | grep -q "${testsym}"
97 echo "Basic three file diff test [Failed diff]"
101 echo "Basic three file diff test [Success]"