]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests/lua: add thread info check to existing test 2532/head 2538/head
authorJason Ish <jason.ish@oisf.net>
Mon, 2 Jun 2025 23:26:37 +0000 (17:26 -0600)
committerJason Ish <jason.ish@oisf.net>
Tue, 3 Jun 2025 17:37:14 +0000 (11:37 -0600)
tests/lua/lua-hashlib/test-hashing.lua

index cc74b0ef4ab34f0a1fbfb3adeb766d6a07d95243..343988480dbac0d246c10f38229ec830f9bd53ca 100644 (file)
@@ -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()