Skip to content

Commit

Permalink
test: do not merge
Browse files Browse the repository at this point in the history
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
  • Loading branch information
mtardy committed Apr 2, 2024
1 parent 68857a5 commit ac79715
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions contrib/tester-progs/go/user-stacktrace/user-stacktrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package main

import (
"os"
"time"
"unsafe"

"golang.org/x/sys/unix"
Expand All @@ -25,5 +26,6 @@ func main() {
os.Exit(int(err))
}
for {
time.Sleep(time.Minute)
}
}
Binary file added contrib/tester-progs/user-stacktrace
Binary file not shown.
12 changes: 8 additions & 4 deletions pkg/sensors/tracing/kprobe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6173,11 +6173,15 @@ spec:
}
observertesthelper.LoopEvents(ctx, t, &doneWG, &readyWG, obs)
readyWG.Wait()
test_cmd := exec.Command(testUserStacktrace)
testProgram := exec.Command(testUserStacktrace)

if err := test_cmd.Start(); err != nil {
if err := testProgram.Start(); err != nil {
t.Fatalf("failed to run %s: %s", testUserStacktrace, err)
}
t.Cleanup(func() {
testProgram.Process.Kill()
fmt.Println("*******Killed********")
})

fmt.Println("*******Test started********")
stackTraceChecker := ec.NewProcessKprobeChecker("user-stack-trace").
Expand All @@ -6200,8 +6204,8 @@ spec:
fmt.Println("*******checked********")

// Kill test because of endless loop in the test for stable stack trace extraction
test_cmd.Process.Kill()
fmt.Println("*******Killed********")
// test_cmd.Process.Kill()
// fmt.Println("*******Killed********")

assert.NoError(t, err)
}
Expand Down

0 comments on commit ac79715

Please sign in to comment.