Skip to content

Commit

Permalink
cgtracker_test: skip if test cannot mkdir
Browse files Browse the repository at this point in the history
In GH runners, we get:

--- FAIL: TestCgTrackerMap (0.12s)
    cgtracker_test.go:73: '/sys/fs/cgroup' is cgroup v1
    cgtracker_test.go:81: failed to create test dir: mkdir /sys/fs/cgroup/cgtracker-test-1715271346: read-only file system

So it seems that we cannot execute the test there. Skip it for now.

Signed-off-by: Kornilios Kourtis <[email protected]>
  • Loading branch information
kkourt committed Nov 27, 2024
1 parent 2bd1261 commit a108768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cgtracker/test/cgtracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func cgfsMkdirTemp(t *testing.T, cgfsPath string) string {
// create tempdir
dir, err := os.MkdirTemp(cgfsPath, "cgtracker-test-*")
if err != nil {
t.Fatalf("failed to create test dir: %s", err)
t.Skip("skipping test, failed to create test dir: %s", err)

Check failure on line 81 in pkg/cgtracker/test/cgtracker_test.go

View workflow job for this annotation

GitHub Actions / analyze

(*testing.common).Skip call has possible Printf formatting directive %s
}
t.Cleanup(func() {
err := os.RemoveAll(dir)
Expand Down

0 comments on commit a108768

Please sign in to comment.