Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libbpfjit Replace accidentally committed test with...
details: https://anonhg.NetBSD.org/src/rev/61a533533cc4
branches: trunk
changeset: 336159:61a533533cc4
user: alnsn <alnsn%NetBSD.org@localhost>
date: Sat Feb 14 20:39:09 2015 +0000
description:
Replace accidentally committed test with libbpfjit_jmp_jeq_x_noinit_ax test.
diffstat:
tests/lib/libbpfjit/t_bpfjit.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diffs (56 lines):
diff -r 32c89822cbe6 -r 61a533533cc4 tests/lib/libbpfjit/t_bpfjit.c
--- a/tests/lib/libbpfjit/t_bpfjit.c Sat Feb 14 20:29:36 2015 +0000
+++ b/tests/lib/libbpfjit/t_bpfjit.c Sat Feb 14 20:39:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_bpfjit.c,v 1.12 2015/02/14 20:29:36 alnsn Exp $ */
+/* $NetBSD: t_bpfjit.c,v 1.13 2015/02/14 20:39:09 alnsn Exp $ */
/*-
* Copyright (c) 2011-2012, 2014 Alexander Nasonov.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_bpfjit.c,v 1.12 2015/02/14 20:29:36 alnsn Exp $");
+__RCSID("$NetBSD: t_bpfjit.c,v 1.13 2015/02/14 20:39:09 alnsn Exp $");
#include <atf-c.h>
#include <stdint.h>
@@ -2455,20 +2455,19 @@
bpfjit_free_code(code);
}
-ATF_TC(libbpfjit_jmp_x_uninitialised);
-ATF_TC_HEAD(libbpfjit_jmp_x_uninitialised, tc)
+ATF_TC(libbpfjit_jmp_jeq_x_noinit_ax);
+ATF_TC_HEAD(libbpfjit_jmp_jeq_x_noinit_ax, tc)
{
atf_tc_set_md_var(tc, "descr", "Test JIT compilation "
- "of BPF_JMP+BPF_EQ+BPF_X with uninitialised X");
-}
-
-ATF_TC_BODY(libbpfjit_jmp_x_uninitialised, tc)
+ "of BPF_JMP+BPF_EQ+BPF_X with uninitialised A and X");
+}
+
+ATF_TC_BODY(libbpfjit_jmp_jeq_x_noinit_ax, tc)
{
static struct bpf_insn insns[] = {
- BPF_STMT(BPF_LD+BPF_W+BPF_LEN, 0), /* A > 0 */
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_X, 0, 0, 1),
- BPF_STMT(BPF_RET+BPF_K, 11),
- BPF_STMT(BPF_RET+BPF_K, 10)
+ BPF_STMT(BPF_RET+BPF_K, 10),
+ BPF_STMT(BPF_RET+BPF_K, 11)
};
bpfjit_func_t code;
@@ -4644,7 +4643,7 @@
ATF_TP_ADD_TC(tp, libbpfjit_jmp_jge_x);
ATF_TP_ADD_TC(tp, libbpfjit_jmp_jeq_x);
ATF_TP_ADD_TC(tp, libbpfjit_jmp_jset_x);
- ATF_TP_ADD_TC(tp, libbpfjit_jmp_x_uninitialised);
+ ATF_TP_ADD_TC(tp, libbpfjit_jmp_jeq_x_noinit_ax);
ATF_TP_ADD_TC(tp, libbpfjit_jmp_modulo_x);
ATF_TP_ADD_TC(tp, libbpfjit_ld_abs);
ATF_TP_ADD_TC(tp, libbpfjit_ld_abs_k_overflow);
Home |
Main Index |
Thread Index |
Old Index