add tmt tests for libbpf-tools

Resolves: #RHEL-10124
Signed-off-by: Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com>
This commit is contained in:
Carlos Rodriguez-Fernandez 2023-10-19 12:30:01 -07:00
parent 7204bb96a1
commit 6436833ca5
No known key found for this signature in database
GPG Key ID: 47EBED05C3375B1F
5 changed files with 362 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

8
plans/smoke.fmf Normal file
View File

@ -0,0 +1,8 @@
summary: Smoke tests
discover:
how: fmf
test:
- /versions
- /basics
execute:
how: tmt

120
tests/basics.fmf Normal file
View File

@ -0,0 +1,120 @@
/biolatency:
summary: basic tracing
test: "bpf-biolatency 1 1"
/biopattern:
summary: basic tracing
test: "bpf-biopattern 1 1"
/biosnoop:
summary: basic tracing
test: "bpf-biosnoop 1"
enabled: false # https://issues.redhat.com/browse/RHEL-8664
/biostacks:
summary: basic tracing
test: "bpf-biostacks 1"
enabled: false # https://issues.redhat.com/browse/RHEL-14313
/bitesize:
summary: basic tracing
test: "bpf-bitesize 1 1"
/cachestat:
summary: basic tracing
test: "bpf-cachestat 1 1"
/cpudist:
summary: basic tracing
test: "bpf-cpudist 1 1"
/cpufreq:
summary: basic tracing
test: "bpf-cpufreq -d 1"
enabled: false # https://bugzilla.redhat.com/show_bug.cgi?id=2217179
/drsnoop:
summary: basic tracing
test: "bpf-drsnoop -d 1"
/filetop:
summary: basic tracing
test: "bpf-filetop 1 1"
/fsdist:
summary: basic tracing
test: "bpf-fsdist -t $(df -T $(pwd) | tail -1 | awk '{print $2}') 1 1"
/fsslower:
summary: basic tracing
test: "bpf-fsslower -t $(df -T $(pwd) | tail -1 | awk '{print $2}') -d 1"
/funclatency:
summary: basic tracing
test: "bpf-funclatency -i 1 -d 1 vfs_read"
/hardirqs:
summary: basic tracing
test: "bpf-hardirqs 1 1"
/klockstat:
summary: basic tracing
test: "bpf-klockstat -d 1"
/llcstat:
summary: basic tracing
test: "bpf-llcstat 1"
/offcputime:
summary: basic tracing
test: "bpf-offcputime 1"
/opensnoop:
summary: basic tracing
test: "bpf-opensnoop -x -d 1"
enabled: false # https://issues.redhat.com/browse/RHEL-8662
/readahead:
summary: basic tracing
test: "bpf-readahead -d 1"
enabled: false # https://issues.redhat.com/browse/RHEL-8663
/runqlat:
summary: basic tracing
test: "bpf-runqlat 1 1"
/runqlen:
summary: basic tracing
test: "bpf-runqlen 1 1"
/slabratetop:
summary: basic tracing
test: "bpf-slabratetop 1 1"
/softirqs:
summary: basic tracing
test: "bpf-softirqs 1 1"
/syscount:
summary: basic tracing
test: "bpf-syscount -d 1 -T 1"
/tcprtt:
summary: basic tracing
test: "bpf-tcprtt -d 1 -i 1"
/tcptop:
summary: basic tracing
test: "bpf-tcptop 1 1"
/tcpsynbl:
summary: basic tracing
test: "bpf-tcpsynbl 1 1"
/vfsstat:
summary: basic tracing
test: "bpf-vfsstat 1 1"
/wakeuptime:
summary: basic tracing
test: "bpf-wakeuptime 1"

2
tests/main.fmf Normal file
View File

@ -0,0 +1,2 @@
require:
- libbpf-tools

231
tests/versions.fmf Normal file
View File

@ -0,0 +1,231 @@
/bindsnoop:
summary: get version
test: "bpf-bindsnoop -V"
/biolatency:
summary: get version
test: "bpf-biolatency -V"
/biopattern:
summary: get version
test: "bpf-biopattern -V"
/biosnoop:
summary: get version
test: "bpf-biosnoop -V"
/biostacks:
summary: get version
test: "bpf-biostacks -V"
/bitesize:
summary: get version
test: "bpf-bitesize -V"
/btrfsdist:
summary: get version
test: "bpf-btrfsdist -V"
/btrfsslower:
summary: get version
test: "bpf-btrfsslower -V"
/cachestat:
summary: get version
test: "bpf-cachestat -V"
/capable:
summary: get version
test: "bpf-capable -V"
/cpudist:
summary: get version
test: "bpf-cpudist -V"
/cpufreq:
summary: get version
test: "bpf-cpufreq -V"
/drsnoop:
summary: get version
test: "bpf-drsnoop -V"
/execsnoop:
summary: get version
test: "bpf-execsnoop -V"
/exitsnoop:
summary: get version
test: "bpf-exitsnoop -V"
/ext4dist:
summary: get version
test: "bpf-ext4dist -V"
/ext4slower:
summary: get version
test: "bpf-ext4slower -V"
/filelife:
summary: get version
test: "bpf-filelife -V"
/filetop:
summary: get version
test: "bpf-filetop -V"
/fsdist:
summary: get version
test: "bpf-fsdist -V"
/fsslower:
summary: get version
test: "bpf-fsslower -V"
/funclatency:
summary: get version
test: "bpf-funclatency -V"
/gethostlatency:
summary: get version
test: "bpf-gethostlatency -V"
/hardirqs:
summary: get version
test: "bpf-hardirqs -V"
/killsnoop:
summary: get version
test: "bpf-killsnoop -V"
/klockstat:
summary: get version
test: "bpf-klockstat -V"
/ksnoop:
summary: get version
test: "bpf-ksnoop -V"
/llcstat:
summary: get version
test: "bpf-llcstat -V"
/mdflush:
summary: get version
test: "bpf-mdflush -V"
/mountsnoop:
summary: get version
test: "bpf-mountsnoop -V"
/nfsdist:
summary: get version
test: "bpf-nfsdist -V"
/nfsslower:
summary: get version
test: "bpf-nfsslower -V"
/numamove:
summary: get version
test: "bpf-numamove -V"
/offcputime:
summary: get version
test: "bpf-offcputime -V"
/oomkill:
summary: get version
test: "bpf-oomkill -V"
/opensnoop:
summary: get version
test: "bpf-opensnoop -V"
/readahead:
summary: get version
test: "bpf-readahead -V"
/runqlat:
summary: get version
test: "bpf-runqlat -V"
/runqlen:
summary: get version
test: "bpf-runqlen -V"
/runqslower:
summary: get version
test: "bpf-runqslower -V"
/sigsnoop:
summary: get version
test: "bpf-sigsnoop -V"
/slabratetop:
summary: get version
test: "bpf-slabratetop -V"
/softirqs:
summary: get version
test: "bpf-softirqs -V"
/solisten:
summary: get version
test: "bpf-solisten -V"
/statsnoop:
summary: get version
test: "bpf-statsnoop -V"
/syscount:
summary: get version
test: "bpf-syscount -V"
/tcpconnect:
summary: get version
test: "bpf-tcpconnect -V"
/tcpconnlat:
summary: get version
test: "bpf-tcpconnlat -V"
/tcplife:
summary: get version
test: "bpf-tcplife -V"
/tcprtt:
summary: get version
test: "bpf-tcprtt -V"
/tcpsynbl:
summary: get version
test: "bpf-tcpsynbl -V"
/tcptracer:
summary: get version
test: "bpf-tcptracer -V"
/tcptop:
summary: get version
test: "bpf-tcptop -V"
/tcpstates:
summary: get version
test: "bpf-tcpstates -V"
/vfsstat:
summary: get version
test: "bpf-vfsstat -V"
/xfsdist:
summary: get version
test: "bpf-xfsdist -V"
/xfsslower:
summary: get version
test: "bpf-xfsslower -V"
/wakeuptime:
summary: get version
test: "bpf-wakeuptime -V"