File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,31 @@ test_cgroup() {
231
231
echo " Cgroup sampling test [Success]"
232
232
}
233
233
234
+ test_uid () {
235
+ echo " Uid sampling test"
236
+ if ! perf record -aB --synth=no --uid " $( id -u) " -o " ${perfdata} " ${testprog} \
237
+ > " ${script_output} " 2>&1
238
+ then
239
+ if grep -q " libbpf.*EPERM" " ${script_output} "
240
+ then
241
+ echo " Uid sampling [Skipped permissions]"
242
+ return
243
+ else
244
+ echo " Uid sampling [Failed to record]"
245
+ err=1
246
+ # cat "${script_output}"
247
+ return
248
+ fi
249
+ fi
250
+ if ! perf report -i " ${perfdata} " -q | grep -q " ${testsym} "
251
+ then
252
+ echo " Uid sampling [Failed missing output]"
253
+ err=1
254
+ return
255
+ fi
256
+ echo " Uid sampling test [Success]"
257
+ }
258
+
234
259
test_leader_sampling () {
235
260
echo " Basic leader sampling test"
236
261
if ! perf record -o " ${perfdata} " -e " {cycles,cycles}:Su" -- \
@@ -345,6 +370,7 @@ test_system_wide
345
370
test_workload
346
371
test_branch_counter
347
372
test_cgroup
373
+ test_uid
348
374
test_leader_sampling
349
375
test_topdown_leader_sampling
350
376
test_precise_max
You can’t perform that action at this time.
0 commit comments