Skip to content

Commit f57f307

Browse files
ci: change from alpine to debian bookworm the golang image for unit-tests (#6)
* ci: change from alpine to debian bookworm the golang image for unit-tests * fix: specify "arm64" arch for unit-tests * ci: add build badge in README.md
1 parent 54d97a8 commit f57f307

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ steps:
99
key: "test"
1010
command: ".buildkite/test.sh"
1111
agents:
12-
image: "golang:1.21.6-alpine3.19"
12+
image: "golang:1.21.6-bookworm"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Tracing KProbes from BTF (tk-btf)
2+
[![Build status](https://badge.buildkite.com/127fe118a0ca01517075701041070b66e1a6c27322132658db.svg)](https://buildkite.com/elastic/tk-btf)
3+
24
`tk-btf` is a Go package to fabricate the string representation of [Linux tracing kprobes](https://docs.kernel.org/trace/kprobetrace.html#usage-examples) based on [BTF](https://docs.kernel.org/bpf/btf.html) files.
35

46
## Quick Start

spec_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ package tkbtf
2020
import (
2121
"os"
2222
"path/filepath"
23-
"runtime"
2423
"testing"
2524

2625
"github.com/cilium/ebpf/btf"
@@ -35,7 +34,7 @@ func TestSpec(t *testing.T) {
3534
}()
3635

3736
spec := generateBTFSpec()
38-
spec.regs, err = getRegistersResolver(runtime.GOARCH)
37+
spec.regs, err = getRegistersResolver("arm64")
3938
require.NoError(t, err)
4039

4140
c := struct {
@@ -79,7 +78,9 @@ func TestSpec(t *testing.T) {
7978
require.NoError(t, err)
8079

8180
// load stripped spec from path; NOTE this an actual implementation of *btf.Spec
82-
pathSpec, err := NewSpecFromPath(fileName, nil)
81+
pathSpec, err := NewSpecFromPath(fileName, &SpecOptions{
82+
arch: "arm64",
83+
})
8384
require.NoError(t, err)
8485
// check that qstr is actually stripped
8586
_, err = pathSpec.spec.AnyTypesByName("qstr")
@@ -109,7 +110,9 @@ func TestSpec(t *testing.T) {
109110
_ = file.Close()
110111
}()
111112

112-
readerSpec, err := NewSpecFromReader(file, nil)
113+
readerSpec, err := NewSpecFromReader(file, &SpecOptions{
114+
arch: "arm64",
115+
})
113116
require.NoError(t, err)
114117
// check that qstr is actually stripped
115118
_, err = readerSpec.spec.AnyTypesByName("qstr")

0 commit comments

Comments
 (0)