#!/bin/bash . /usr/share/beakerlib/beakerlib.sh rlJournalStart CONFIG_FILE=/boot/config-$(uname -r) if ! grep "CONFIG_BPF_SYSCALL=y" $CONFIG_FILE; then rstrnt-report-result $TEST SKIP 0 exit 0 fi rlPhaseStartSetup dnf install -y kernel-devel rpm -q bpftool || dnf install -y -q bpftool BEAHARCH=${ARCH} unset ARCH rlPhaseEnd for cmds in prog map link perf net; do if ! bpftool help 2>&1 | grep " OBJECT" | grep -q "${cmds}"; then continue fi rlPhaseStartTest "bpftool ${cmds}" rlRun -l "bpftool ${cmds}" rlPhaseEnd done for cmds in feature btf; do if ! bpftool help 2>&1 | grep " OBJECT" | grep -q "${cmds}"; then continue fi rlPhaseStartTest "bpftool ${cmds}" rlRun -l "bpftool ${cmds} &> bpftool-${cmds}.log" rstrnt-report-log bpftool-${cmds}.log rlPhaseEnd done rlPhaseStartCleanup ARCH=${BEAHARCH} rlPhaseEnd rlJournalEnd