From 596d7608333290d22ea6cee26a79eb4f9ca8605d Mon Sep 17 00:00:00 2001 From: Jeff Lucovsky Date: Sat, 24 Apr 2021 15:44:17 -0400 Subject: [PATCH] tests/vntag: VNTAG decoder unittests --- src/decode-vntag.c | 4 ++-- src/decode.h | 1 + src/runmode-unittests.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/decode-vntag.c b/src/decode-vntag.c index b5bf235d9d..b7963238bb 100644 --- a/src/decode-vntag.c +++ b/src/decode-vntag.c @@ -100,8 +100,8 @@ static int DecodeVNTagtest01(void) { uint8_t raw_vntag[] = { 0x00, 0x20, 0x08 }; Packet *p = PacketGetFromAlloc(); - if (unlikely(p == NULL)) - return 0; + FAIL_IF_NULL(p); + ThreadVars tv; DecodeThreadVars dtv; diff --git a/src/decode.h b/src/decode.h index d44fe8cb28..26341a114d 100644 --- a/src/decode.h +++ b/src/decode.h @@ -94,6 +94,7 @@ enum PktSrcEnum { #include "decode-raw.h" #include "decode-null.h" #include "decode-vlan.h" +#include "decode-vntag.h" #include "decode-vxlan.h" #include "decode-mpls.h" #include "decode-nsh.h" diff --git a/src/runmode-unittests.c b/src/runmode-unittests.c index 8aae154e30..e6617c307f 100644 --- a/src/runmode-unittests.c +++ b/src/runmode-unittests.c @@ -142,6 +142,7 @@ static void RegisterUnittests(void) DecodeCHDLCRegisterTests(); DecodePPPRegisterTests(); DecodeVLANRegisterTests(); + DecodeVNTagRegisterTests(); DecodeGeneveRegisterTests(); DecodeVXLANRegisterTests(); DecodeRawRegisterTests();