Skip to content

Commit

Permalink
test: add special provider test
Browse files Browse the repository at this point in the history
And check uprobe config too as the special providers use it
internally.
  • Loading branch information
namhyung authored and wkz committed Sep 29, 2021
1 parent 7ccbe50 commit 89f6b6b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ply/self-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ fi

if [ "$kconf" ]; then
$kconf | awk '
/^CONFIG_BPF_SYSCALL=y$/ { bpf=1 }
/^CONFIG_BPF_SYSCALL=y$/ { bpf=1 }
/^CONFIG_KPROBES=y$/ { kprobes=1 }
/^CONFIG_UPROBES=y$/ { uprobes=1 }
/^CONFIG_TRACEPOINTS=y$/ { tracepoints=1 }
/^CONFIG_FTRACE=y$/ { ftrace=1 }
/^CONFIG_DYNAMIC_FTRACE=y$/ { dftrace=1 }
Expand All @@ -38,6 +39,8 @@ if [ "$kconf" ]; then
print(" CONFIG_BPF_SYSCALL is not set");
if (!kprobes)
print(" CONFIG_KPROBES is not set");
if (!uprobes)
print(" CONFIG_UPROBES is not set");
if (!tracepoints)
print(" CONFIG_TRACEPOINTS is not set");
if (!ftrace)
Expand Down Expand Up @@ -81,4 +84,12 @@ else
err=1
fi

echo -n "Verifying special... "
if $PLYBIN 'BEGIN { exit(0); }' 2>/dev/null; then
echo "OK"
else
echo "ERROR"
err=1
fi

exit $err

0 comments on commit 89f6b6b

Please sign in to comment.