Skip to content

Commit 46c3446

Browse files
committed
tetragon: Display verifier log in TestVerifyTetragonPrograms
Signed-off-by: Jiri Olsa <[email protected]>
1 parent ddcf58d commit 46c3446

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

contrib/verify/verify_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package verify
77

88
import (
9+
"errors"
910
"fmt"
1011
"log"
1112
"os"
@@ -114,6 +115,14 @@ func TestVerifyTetragonPrograms(t *testing.T) {
114115
}
115116

116117
collection, err := ebpf.NewCollection(spec)
118+
if err != nil {
119+
var ve *ebpf.VerifierError
120+
if errors.As(err, &ve) {
121+
fmt.Printf("%+v\n", ve)
122+
fmt.Printf("failed object %s\n", fileName)
123+
}
124+
}
125+
117126
require.NoError(t, err, "failed to load resources into the kernel")
118127

119128
collection.Close()

0 commit comments

Comments
 (0)