mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-10-29 03:34:44 +08:00
* Add targeted TCP connection quarantine tool * Document TCP quarantine workflow * Refresh package indexes before CI install * Document TCP quarantine namespace scope * Require BPF events for TCP iterator * Add production fsession latency tracer * Document fsession latency workflow * Reject empty fsession CLI values * Preserve successful fsession exit status * Document fsession deadline regression test * Drain fsession events before summary * Document fsession PID and shutdown semantics * Simplify fsession polling control flow * Add bounded BPF egress pacer tutorial * Test queued packet cleanup on signal * Document the BPF egress pacer * Polish and review the BPF egress pacer * Refactor egress pacer option parsing * Add executable image inspector lesson * Build the exec image inspector in CI * Document executable image inspection * Handle re-exec chains in the image inspector * Polish exec image inspector guidance * Reduce exec inspector wait complexity * Rewrite the egress pacer tutorial * Rewrite the exec image inspector tutorial * Polish the exec image inspector tutorial * Correct the egress pacer tutorial * Make the exec tutorial Chinese natural * Fix egress tutorial prose checks * Finish the exec tutorial style pass * Clarify exec tutorial runtime evidence * Polish exec tutorial scope wording * Rewrite the egress pacer tutorial for readers * Regenerate tutorial indexes * Teach the egress pacer component by component * Use standard Markdown in the egress tutorial * Strengthen the egress pacer tutorial narrative * jiji * Use positive framing in the egress tutorial * Rewrite the exec image inspector tutorial * Rewrite the TCP quarantine tutorial * Add the egress pacer lifecycle diagram * Refresh TCP tutorial indexes * Add the exec image inspection flow diagram * Use one source directory link * Rewrite the fsession latency tutorial * Add fsession feature background * Add BPF qdisc feature background * Add TCP iterator feature background * Add exec inspection feature background * Require feature background in tutorial openings * Polish fsession background prose * Simplify repository tutorial skills * Update exec inspector tooling revisions * Restructure tutorials 51-54 following advanced guideline - Update SKILL.md with strict section ordering and "why" requirements - Rewrite README.zh.md for tutorials 51-54: - Add background sections explaining why traditional approaches fail - Move compilation/execution sections after code analysis - Add high-level mechanism explanation before code - Use paragraph style instead of bullet lists * Consolidate skill guidelines and remove duplicates - Update write-bpf-production-tutorial skill to reference 47, 48, 49 - Add structure requirements section with "Why" section emphasis - Remove duplicate advanced-tutorial-guidelines.md (use scripts/guideline_advance.md instead) * Rewrite English READMEs 51-54 to match Chinese structure Restructure all four English tutorials to match their Chinese counterparts: - Add "Why this approach is needed" sections explaining traditional limitations - Add high-level mechanism sections before code - Move compilation/execution sections after code analysis - Add environment requirements tables - Use consistent section ordering across all tutorials * Regenerate TOC after tutorial title changes Run generate_toc.py to sync SUMMARY and README files with updated tutorial titles from the restructuring. * Regenerate compatibility tables after title changes --------- Co-authored-by: LinuxDev9002 <i@littlefisher.me>
207 lines
5.7 KiB
YAML
207 lines
5.7 KiB
YAML
name: Test eunomia-bpf example CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
schedule:
|
|
- cron: '0 0 * * 0'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
submodules: 'recursive'
|
|
- name: install deps
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
libelf1 libelf-dev zlib1g-dev \
|
|
make git clang llvm pkg-config build-essential dwarves \
|
|
linux-headers-generic-hwe-24.04
|
|
- name: test 11 bootstrap
|
|
run: |
|
|
make -C src/11-bootstrap
|
|
sudo timeout -s 2 3 src/11-bootstrap/bootstrap || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
- name: test 12 profile
|
|
run: |
|
|
make -C src/12-profile
|
|
# sudo timeout -s 2 3 src/12-profile/profile || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
- name: test 13 tcpconnlat
|
|
run: |
|
|
make -C src/13-tcpconnlat
|
|
sudo timeout -s 2 3 src/13-tcpconnlat/tcpconnlat || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
- name: test 14 tcpstates
|
|
run: |
|
|
make -C src/14-tcpstates
|
|
sudo timeout -s 2 3 src/14-tcpstates/tcpstates || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
- name: test 15 javagc
|
|
run: |
|
|
make -C src/15-javagc
|
|
- name: test 16 memleak
|
|
run: |
|
|
make -C src/16-memleak
|
|
sudo timeout -s 2 3 src/16-memleak/memleak || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
- name: test 17 biopattern
|
|
run: |
|
|
make -C src/17-biopattern
|
|
sudo timeout -s 2 3 src/17-biopattern/biopattern || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
- name: test 23 http
|
|
run: |
|
|
make -C src/23-http
|
|
sudo timeout -s 2 3 src/23-http/sockfilter || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
- name: test 24 hide
|
|
run: |
|
|
make -C src/24-hide
|
|
- name: test 26 sudo
|
|
run: |
|
|
make -C src/26-sudo
|
|
- name: test 27 replace
|
|
run: |
|
|
make -C src/27-replace
|
|
- name: test 28 detach
|
|
run: |
|
|
make -C src/28-detach
|
|
sudo mount bpffs -t bpf /sys/fs/bpf
|
|
sudo mkdir /sys/fs/bpf/textreplace
|
|
# sudo src/28-detach/textreplace2 -f /proc/modules -i 'joydev' -r 'cryptd' -d || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
- name: test 29 sockops
|
|
run: |
|
|
make -C src/29-sockops
|
|
# TODO: add test
|
|
- name: test 30 sslsniff
|
|
run: |
|
|
make -C src/30-sslsniff
|
|
sudo timeout -s 2 3 src/30-sslsniff/sslsniff || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
|
|
- name: test 32 wallclock-profiler
|
|
run: |
|
|
make -C src/32-wallclock-profiler
|
|
# Test individual tools can be built and show help
|
|
src/32-wallclock-profiler/oncputime --help || true
|
|
src/32-wallclock-profiler/offcputime --help || true
|
|
|
|
- name: test 33 funclatency
|
|
run: |
|
|
make -C src/33-funclatency
|
|
- name: test 34 syscall
|
|
run: |
|
|
make -C src/34-syscall
|
|
- name: test 35-user-ringbuf
|
|
run: |
|
|
make -C src/35-user-ringbuf
|
|
sudo timeout -s 2 3 src/35-user-ringbuf/user_ringbuf || if [ $? = 124 ]; then exit 0; else exit $?; fi
|
|
|
|
- name: test 38 btf-uprobe
|
|
run: |
|
|
make -C src/38-btf-uprobe
|
|
|
|
- name: test 38 btf-uprobe examples
|
|
run: |
|
|
make -C src/38-btf-uprobe/examples
|
|
|
|
- name: test 41 xdp
|
|
run: |
|
|
make -C src/41-xdp-tcpdump
|
|
|
|
- name: test 42 xdp
|
|
run: |
|
|
make -C src/42-xdp-loadbalancer
|
|
|
|
- name: test 43 kfuncs
|
|
run: |
|
|
make -C src/43-kfuncs
|
|
|
|
- name: test 43 kfuncs module
|
|
run: |
|
|
KDIR=$(find /usr/src -maxdepth 1 -type d -name 'linux-headers-*-generic' | sort -V | tail -1)
|
|
test -n "$KDIR"
|
|
make -C src/43-kfuncs/module KDIR="$KDIR"
|
|
|
|
- name: test 44
|
|
run: |
|
|
make -C src/44-scx-simple
|
|
- name: test 45
|
|
run: |
|
|
make -C src/45-scx-nest
|
|
|
|
- name: test 46 xdp-pktgen
|
|
run: |
|
|
make -C src/46-xdp-test
|
|
|
|
- name: test 47 cuda-events
|
|
run: |
|
|
make -C src/47-cuda-events cuda_events
|
|
if command -v nvcc >/dev/null; then
|
|
make -C src/47-cuda-events basic02 bench
|
|
fi
|
|
|
|
- name: test 48 energy
|
|
run: |
|
|
make -C src/48-energy
|
|
|
|
- name: test 49 HID
|
|
run: |
|
|
make -C src/49-hid
|
|
|
|
- name: test features bpf_arena
|
|
run: |
|
|
make -C src/features/bpf_arena
|
|
|
|
- name: test features bpf_iters
|
|
run: |
|
|
make -C src/features/bpf_iters
|
|
|
|
- name: test features bpf_wq
|
|
run: |
|
|
make -C src/features/bpf_wq
|
|
|
|
- name: test features dynptr
|
|
run: |
|
|
make -C src/features/dynptr
|
|
|
|
- name: test features struct_ops
|
|
run: |
|
|
make -C src/features/struct_ops
|
|
|
|
- name: test features struct_ops module
|
|
run: |
|
|
KDIR=$(find /usr/src -maxdepth 1 -type d -name 'linux-headers-*-generic' | sort -V | tail -1)
|
|
test -n "$KDIR"
|
|
make -C src/features/struct_ops/module KDIR="$KDIR"
|
|
|
|
- name: test 50 tcx
|
|
run: |
|
|
make -C src/50-tcx
|
|
|
|
- name: test 51 TCP quarantine
|
|
run: |
|
|
make -C src/51-tcp-quarantine
|
|
sudo timeout 30 make -C src/51-tcp-quarantine test
|
|
|
|
- name: test 52 fsession latency
|
|
run: |
|
|
make -C src/52-fsession-latency
|
|
|
|
- name: test 53 egress pacer
|
|
run: |
|
|
make -C src/53-egress-pacer
|
|
|
|
- name: test 54 exec image inspector
|
|
run: |
|
|
make -C src/54-exec-image-inspector
|
|
|
|
- name: test features bpf_token
|
|
run: |
|
|
make -C src/features/bpf_token
|
|
|
|
- name: test cgroup
|
|
run: |
|
|
make -C src/cgroup
|