File: trace-utest

package info (click to toggle)
trace-cmd 3.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,056 kB
  • sloc: ansic: 33,750; makefile: 966; sh: 762; python: 604
file content (19 lines) | stat: -rw-r--r-- 633 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
set -xeuo pipefail

# Make sure ftrace is configured in the kernel. Skip this test otherwise.
if [[ "$(mount | awk '/tracefs/{print $5}')" != "tracefs" ]]; then
    echo "skipping test - tracefs not mounted"
    exit 77
fi

# Make sure we have permissions to read /sys/kernel/tracing.
if ! ls /sys/kernel/tracing; then
    echo "skipping test - cannot read /sys/kernel/tracing"
    exit 77
fi

# Build trace-utest using the libraries installed on the system instead of in-tree ones.
cc -o utest/trace-utest utest/trace-utest.c utest/tracecmd-utest.c $(pkg-config --cflags --libs libtracecmd) -lcunit

./utest/trace-utest