Skip to contentSkip to conversation

test_bpf: add 173 new testcases for eBPF

PATCH Applied Alexei Starovoitov 3 participants 4 messages May 12, 2015 – May 13, 2015

Subsystems (5)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test_bpf: add 173 new testcases for eBPF

From: Michael Holzheu <[email protected]>

From: Michael Holzheu <[email protected]>

add an exhaustive set of eBPF tests bringing total to:
test_bpf: Summary: 233 PASSED, 0 FAILED, [0/226 JIT'ed]

---
these tests found div64 bug in interpreter (already fixed) and another cpu_to_be16 bug in x64 JIT (fix is being worked on).

 include/linux/filter.h |   10 +
 lib/test_bpf.c         | 2192 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2202 insertions(+)
include/linux/filter.h +10 -0
index 3c03a6085b82..ce1d72d34382 100644
@@ -207,6 +207,16 @@ struct bpf_prog_aux;
 		.off   = OFF,					\
 		.imm   = 0 })
 
+/* Atomic memory add, *(uint *)(dst_reg + off16) += src_reg */
+
+#define BPF_STX_XADD(SIZE, DST, SRC, OFF)			\
+	((struct bpf_insn) {					\
+		.code  = BPF_STX | BPF_SIZE(SIZE) | BPF_XADD,	\
+		.dst_reg = DST,					\
+		.src_reg = SRC,					\
+		.off   = OFF,					\
+		.imm   = 0 })
+
 /* Memory store, *(uint *) (dst_reg + off16) = imm32 */
 
 #define BPF_ST_MEM(SIZE, DST, OFF, IMM)				\
lib/test_bpf.c +2192 -0

2,198 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Alexei Starovoitov

From: Michael Holzheu <[email protected]>

From: Michael Holzheu <[email protected]>

'From' tag somehow slipped in twice for some reason. Downloading the mbox and applying it shows the second on in the git log.

Quoted 5 lines

add an exhaustive set of eBPF tests bringing total to:
test_bpf: Summary: 233 PASSED, 0 FAILED, [0/226 JIT'ed]

Other than that, very nice to see this getting further extended!

#2 lore raw
Quoted 7 lines · Daniel Borkmann
Quoted 3 lines · Alexei Starovoitov

From: Michael Holzheu <[email protected]>

From: Michael Holzheu <[email protected]>

'From' tag somehow slipped in twice for some reason. Downloading the mbox and applying it shows the second on in the git log.

hmm, that's odd.
I've actually tried to manually 'git am' the patch before sending and it applied without extra 'From'.
But now I did 'pwclient git-am 471127' and indeed I see an extra 'From' line.
Strange.
Sure, will respin.