Skip to content

tetragon: do proper cleanup for uprobe and tracepoint sensors #12641

tetragon: do proper cleanup for uprobe and tracepoint sensors

tetragon: do proper cleanup for uprobe and tracepoint sensors #12641

Workflow file for this run

name: Tetragon Go Test
on:
pull_request:
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-24.04-arm64 ]
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: go/src/github.com/cilium/tetragon/
- name: Install Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
# renovate: datasource=golang-version depName=go
go-version: '1.24.4'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libelf-dev netcat-traditional libcap-dev gcc
sudo sed -i '/secure_path/d' /etc/sudoers
sudo sed -i '/env_reset/d' /etc/sudoers
echo `which clang`
echo `which llc`
echo `clang --version`
- name: Install dependencies x86
run: |
sudo apt-get -y install libc6-dev-i386
if: ${{ matrix.os == 'ubuntu-24.04' }}
- name: Install dependencies ARM
run: |
sudo apt-get -y install gcc-arm-linux-gnueabihf
if: ${{ matrix.os == 'ubuntu-24.04-arm64' }}
- name: Install bpftool
uses: mtardy/setup-bpftool@9bc044304197616a6321d452e04cc059e006d8e2 # v1.0.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Ensure BPF programs pass verifier
run: |
cd go/src/github.com/cilium/tetragon/
make verify
- name: Run go tests
env:
GOPATH: ${{ env.GITHUB_WORKSPACE }}/go
SUDO: sudo -E
run: |
go clean -cache -modcache -testcache -fuzzcache
cd go/src/github.com/cilium/tetragon/
sudo -E echo "run go tests: " `uname -a`
sudo -E go mod verify
export TETRAGON_LIB=$(realpath "bpf/objs/")
make test GO_TEST_TIMEOUT=40m
- name: Upload Tetragon logs
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: tetragon-json
path: /tmp/tetragon.gotest*
retention-days: 5
- name: Upload bugtool dumps
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: tetragon-bugtool
path: /tmp/tetragon-bugtool*
retention-days: 5
- name: Upload vmlinux file
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: btf-vmlinux-${{ matrix.os }}
path: /sys/kernel/btf/vmlinux
retention-days: 5
build_windows:
runs-on: windows-latest
timeout-minutes: 40
strategy:
fail-fast: false
steps:
- name: Install Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
# renovate: datasource=golang-version depName=go
go-version: '1.24.4'
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: go/src/github.com/cilium/tetragon/
- name: Run go tests
working-directory: ${{ github.workspace }}\go\src\github.com\cilium\tetragon
run: |
go test --failfast .\pkg\... .\cmd\...