Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/test-bpftrace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,22 @@ jobs:
test -n "$hello_address" || (echo "Error: demangled hello function symbol not found" && exit 1)
hello_symbol=$(nm target/debug/helloworld | awk -v address="$hello_address" '$1 == address && $2 ~ /^[tT]$/ && !matched { found = $3; matched = 1 } END { if (matched) print found }')
test -n "$hello_symbol" || (echo "Error: raw hello function symbol not found" && exit 1)
sudo timeout 3 bpftrace -e "uprobe:target/debug/helloworld:${hello_symbol} { printf(\"traced\\n\"); exit(); }" -c "./target/debug/helloworld 1" > /tmp/bpftrace_output.txt 2>&1 || true
# Give bpftrace room to start: attaching a uprobe plus spawning the
# -c command can take longer than 3s on a loaded runner, and when the
# timeout fires mid-startup the redirect file stays empty, which reads
# as "failed to attach" rather than "took too long".
sudo timeout 10 bpftrace -e "uprobe:target/debug/helloworld:${hello_symbol} { printf(\"traced\\n\"); exit(); }" -c "./target/debug/helloworld 1" > /tmp/bpftrace_output.txt 2>&1 || true
# Check if bpftrace successfully attached and traced the function
if grep -q "traced" /tmp/bpftrace_output.txt && grep -q "Attaching 1 probe" /tmp/bpftrace_output.txt; then
# bpftrace <= 0.19 prints "Attaching N probes", 0.20+ prints
# "Attached N probes"; accept either so the assertion tracks the probe
# being installed rather than the wording of one release.
if grep -q "traced" /tmp/bpftrace_output.txt && grep -Eq "Attach(ing|ed) 1 probe" /tmp/bpftrace_output.txt; then
echo "✓ bpftrace successfully attached to hello function"
else
echo "Error: bpftrace failed to attach or trace the hello function"
if [ ! -s /tmp/bpftrace_output.txt ]; then
echo " (output file is empty: bpftrace likely did not finish starting before the timeout)"
fi
cat /tmp/bpftrace_output.txt
exit 1
fi
3 changes: 2 additions & 1 deletion .github/workflows/test-eunomia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ permissions:

jobs:
build:
runs-on: ubuntu-latest
# LLVM 14 is not available on ubuntu-26.04 (the current ubuntu-latest).
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v7
with:
Expand Down
Loading