Skip to content

Commit 01432ce

Browse files
Dhiverarthurfabre
authored andcommitted
Fix TestNoInline test
The kernel's XDP test runner enforces a minimum packet size of ETH_HLEN (14 bytes) when a packet input is provided. It returns EINVAL for anything smaller.
1 parent 1b95965 commit 01432ce

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

c_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func TestNoInline(t *testing.T) {
4646
t.Fatal(err)
4747
}
4848

49-
if res := testProg(t, spec.Programs[entryPoint], []byte{1}); res != match {
49+
in := make([]byte, 14)
50+
if res := testProg(t, spec.Programs[entryPoint], in); res != match {
5051
t.Fatalf("expected match, got %v", res)
5152
}
5253
}

0 commit comments

Comments
 (0)