From: Jeff Lucovsky Date: Sat, 24 Apr 2021 19:44:17 +0000 (-0400) Subject: tests/vntag: VNTAG decoder unittests X-Git-Tag: suricata-7.0.0-beta1~1649 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=596d7608333290d22ea6cee26a79eb4f9ca8605d;p=thirdparty%2Fsuricata.git tests/vntag: VNTAG decoder unittests --- 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();