Skip to content

Commit

Permalink
Make test specific to disassembleFilter method
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieron Browne committed Mar 25, 2021
1 parent 2bd0fb6 commit 16f9b68
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libcontainer/seccomp/patchbpf/enosys_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func TestEnosysStub_MultiArch(t *testing.T) {
}
}

func TestPatchHugeSeccompFilterDoesNotBlock(t *testing.T) {
func TestDisassembleHugeFilterDoesNotHang(t *testing.T) {
hugeFilter, err := libseccomp.NewFilter(libseccomp.ActAllow)
if err != nil {
t.Fatalf("failed to create seccomp filter: %v", err)
Expand All @@ -294,8 +294,10 @@ func TestPatchHugeSeccompFilterDoesNotBlock(t *testing.T) {
}
}

config := fakeConfig(configs.Kill, []string{}, []string{"amd64"})
PatchAndLoad(config, hugeFilter)
_, err = disassembleFilter(hugeFilter)
if err != nil {
t.Fatalf("failed to disassembleFilter: %v", err)
}

// if we exit, we did not block
// if we exit, we did not hang
}

0 comments on commit 16f9b68

Please sign in to comment.