From: Jason Ish Date: Mon, 2 Jun 2025 23:26:37 +0000 (-0600) Subject: tests/lua: add thread info check to existing test X-Git-Tag: suricata-7.0.11~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2532%2Fhead;p=thirdparty%2Fsuricata-verify.git tests/lua: add thread info check to existing test --- diff --git a/tests/lua/lua-hashlib/test-hashing.lua b/tests/lua/lua-hashlib/test-hashing.lua index cc74b0ef4..343988480 100644 --- a/tests/lua/lua-hashlib/test-hashing.lua +++ b/tests/lua/lua-hashlib/test-hashing.lua @@ -1,6 +1,7 @@ local hashlib = require("suricata.hashlib") local dns = require("suricata.dns") local logger = require("suricata.log") +local util = require("suricata.util") local expected_sha256 = "080bdfdfcd8c2c7fce747f9be4603ced6253caac70894ad89d605309588c60f6" local expected_sha1 = "00f495ffd50c8b5ef3645f61486dae496db0fe2e" @@ -128,6 +129,13 @@ function test_md5(name) end function match(args) + -- Thread test. + local thread = util.thread_info() + assert(thread["name"]:match("^W")) + assert(thread.name:match("^W")) + assert(thread["group_name"] == "Detect") + assert(thread.group_name == "Detect") + local tx = dns.get_tx() local rrname = tx:rrname()